Downgrading SAMBA to have correct management over Badlock bad fix.
This commit is contained in:
parent
6ded48dc2b
commit
6f4c8e478f
25
roles/domain/files/downgrade_samba.sh
Normal file
25
roles/domain/files/downgrade_samba.sh
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
apt-get -y --force-yes install \
|
||||
libldb1=1:1.1.16-1 \
|
||||
libsmbclient=2:4.1.6+dfsg-1ubuntu2 \
|
||||
python-ldb=1:1.1.16-1 \
|
||||
python-samba=2:4.1.6+dfsg-1ubuntu2 \
|
||||
samba=2:4.1.6+dfsg-1ubuntu2 \
|
||||
samba-common=2:4.1.6+dfsg-1ubuntu2 \
|
||||
samba-common-bin=2:4.1.6+dfsg-1ubuntu2 \
|
||||
samba-dsdb-modules=2:4.1.6+dfsg-1ubuntu2 \
|
||||
samba-libs=2:4.1.6+dfsg-1ubuntu2 \
|
||||
samba-vfs-modules=2:4.1.6+dfsg-1ubuntu2 \
|
||||
smbclient=2:4.1.6+dfsg-1ubuntu2 \
|
||||
libnss-winbind=2:4.1.6+dfsg-1ubuntu2 \
|
||||
libpam-winbind=2:4.1.6+dfsg-1ubuntu2 \
|
||||
libwbclient0=2:4.1.6+dfsg-1ubuntu2 \
|
||||
winbind=2:4.1.6+dfsg-1ubuntu2
|
||||
|
||||
pkglist="libldb1 libsmbclient python-ldb python-samba samba-common samba-common-bin samba-dsdb-modules samba-libs samba-vfs-modules smbclient libnss-winbind libpam-winbind libwbclient0"
|
||||
|
||||
for pkg in ${pkglist}; do
|
||||
apt-mark auto ${pkg}
|
||||
apt-mark hold ${pkg}
|
||||
done
|
@ -1,6 +1,32 @@
|
||||
---
|
||||
# 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 }}'
|
||||
|
Loading…
x
Reference in New Issue
Block a user