ansible/node: Remove Samba packages before unpacking binary tarball
authorMartin Schwenke <martin@meltin.net>
Tue, 19 Jul 2022 00:54:27 +0000 (10:54 +1000)
committerMartin Schwenke <martin@meltin.net>
Mon, 19 Feb 2024 00:06:29 +0000 (11:06 +1100)
At a minimum, these can interfere with the systemd handling.

Signed-off-by: Martin Schwenke <martin@meltin.net>
ansible/node/roles/tarball_common/tasks/redhat/uninstall_samba.yml [new file with mode: 0644]
ansible/node/roles/tarball_common/tasks/unpack_binary.yml

diff --git a/ansible/node/roles/tarball_common/tasks/redhat/uninstall_samba.yml b/ansible/node/roles/tarball_common/tasks/redhat/uninstall_samba.yml
new file mode 100644 (file)
index 0000000..1f01096
--- /dev/null
@@ -0,0 +1,20 @@
+---
+- name: ensure Samba packages are not installed
+  package:
+    name:
+      - samba
+      - samba-client
+      - samba-client-libs
+      - samba-common
+      - samba-common-libs
+      - samba-common-tools
+      - samba-dc
+      - samba-dc-libs
+      - samba-libs
+      - samba-python
+      - samba-python-dc
+      - samba-winbind
+      - samba-winbind-modules
+      - libsmbclient
+      - libwbclient
+    state: absent
index aa3389a1eb3056f096d3986cd60dd4af552edbba..09dcce709bc656c55649d63b36945d4d52439939 100644 (file)
@@ -1,4 +1,10 @@
 ---
+- include_tasks: "{{ ansible_os_family | lower }}/{{ task }}.yml"
+  loop:
+  - uninstall_samba
+  loop_control:
+    loop_var: task
+
 - name: unpack binary tarball
   unarchive:
     src: "{{ binary_tarball }}"