client-pull-installation/roles/domain/tasks/pkgs.yml

37 lines
1009 B
YAML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
# Packages needed for domain join
# Badlock wrong resolution: downgrading SAMBA
- name: Copying scripts for fixing SAMBA
copy:
src: "{{ item }}"
dest: "/var/lib/{{ ansible_local.domain.domainfull }}/bin/{{ item }}"
owner: root
mode: 0755
with_items:
- downgrade_samba.sh
- name: Verifying SAMBA version on client
shell: dpkg -l | grep libsmbclient
register: check_samba_version
ignore_errors: yes
changed_when: "'2:4.1.6+dfsg-1ubuntu2' not in check_samba_version.stdout"
#- name: Downgrading SAMBA if not the right version
# shell: "/var/lib/{{ ansible_local.domain.domainfull }}/bin/downgrade_samba.sh"
# when: check_samba_version|changed
#
#- name: Checking again for the correct SAMBA version
# shell: dpkg -l | grep libsmbclient
# register: recheck_samba_version
# changed_when: "'2:4.1.6+dfsg-1ubuntu2' in check_samba_version.stdout"
- name: Installing domain packages
apt:
pkg: '{{ item }}'
state: present
with_items:
- winbind
- samba