]> git.phdru.name Git - ansible.git/commitdiff
Feat(remove-systemd) Split `remove-systemd` as a separate plabook
authorOleg Broytman <phd@phdru.name>
Mon, 2 Sep 2019 19:35:06 +0000 (22:35 +0300)
committerOleg Broytman <phd@phdru.name>
Mon, 2 Sep 2019 19:48:11 +0000 (22:48 +0300)
This allows playbook `init-system2` to gather facts anew
getting that services now must be handled using SysV-init methods.

playbooks/debian/init-system.sh
playbooks/debian/remove-systemd.yml [new file with mode: 0644]
playbooks/init-system2.yml
playbooks/redhat/roles/remove-systemd/README.txt [deleted file]

index 512ce025745b729aaa7258b0ab2524662feb4aad..07a8ff76bf5434b09b4fa9757bfae4ef3100d715 100755 (executable)
@@ -16,4 +16,5 @@ export ANSIBLE_ROLES_PATH &&
 # `sudo` isn't configured yet too; use `su` and ask for root password.
 ansible-playbook ../init-system.yml "$@" -e hosts="$host" \
    --become-method=su -K &&
+ansible-playbook remove-systemd.yml "$@" -e hosts="$host" &&
 exec ansible-playbook ../init-system2.yml "$@" -e hosts="$host"
diff --git a/playbooks/debian/remove-systemd.yml b/playbooks/debian/remove-systemd.yml
new file mode 100644 (file)
index 0000000..ed184c0
--- /dev/null
@@ -0,0 +1,5 @@
+- name: Setup Debain system - remove SystemD
+  hosts: "{{ hosts | default('all') }}"
+  gather_facts: false
+  roles:
+    - remove-systemd
index 662560c396f33aa38ba6e488e39409a524f8ce5d..947fd6609ef574cca5d2923bf149ed9783e86f88 100644 (file)
@@ -1,11 +1,9 @@
-- name: Setup Debain system - part 2
+- name: Setup Linux system - part 2
   hosts: "{{ hosts | default('all') }}"
   gather_facts: true
   roles:
     - firewall
     - logcheck
-    - role: remove-systemd
-      when: ansible_facts.os_family == 'Debian'
     - root
     - setup-usrlocal
     - sshd
diff --git a/playbooks/redhat/roles/remove-systemd/README.txt b/playbooks/redhat/roles/remove-systemd/README.txt
deleted file mode 100644 (file)
index 601fea6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Empty "role" to satisfy `init-system2`.