From: Oleg Broytman Date: Mon, 2 Sep 2019 19:35:06 +0000 (+0300) Subject: Feat(remove-systemd) Split `remove-systemd` as a separate plabook X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=f7e665139a974b34b7f0694e3fbe68a92c7d14a5;p=ansible.git Feat(remove-systemd) Split `remove-systemd` as a separate plabook This allows playbook `init-system2` to gather facts anew getting that services now must be handled using SysV-init methods. --- diff --git a/playbooks/debian/init-system.sh b/playbooks/debian/init-system.sh index 512ce02..07a8ff7 100755 --- a/playbooks/debian/init-system.sh +++ b/playbooks/debian/init-system.sh @@ -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 index 0000000..ed184c0 --- /dev/null +++ b/playbooks/debian/remove-systemd.yml @@ -0,0 +1,5 @@ +- name: Setup Debain system - remove SystemD + hosts: "{{ hosts | default('all') }}" + gather_facts: false + roles: + - remove-systemd diff --git a/playbooks/init-system2.yml b/playbooks/init-system2.yml index 662560c..947fd66 100644 --- a/playbooks/init-system2.yml +++ b/playbooks/init-system2.yml @@ -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 index 601fea6..0000000 --- a/playbooks/redhat/roles/remove-systemd/README.txt +++ /dev/null @@ -1 +0,0 @@ -Empty "role" to satisfy `init-system2`.