Add a daemon-reload to the tripleo-iptables services

Normally this is not needed but after trying to clean up a borked
undercloud I repeatedly stumbled in:
TASK [create iptables service] * changed: [undercloud-0]

TASK [enable tripleo-iptables service] * fatal: [undercloud-0]: FAILED! => {"changed": false, "msg": "Could not find the requested service tripleo-iptables.service: host"}

While I genuinely am not sure how exactly I managed to get into
this state on the undercloud, with this change I managed to get
past this error during the redeploy and it seems to be more robust
anyway.

In the process of this change we also move to the 'systemd' ansible
module which is what is used everywhere anyway (so we can leverage
the daemon-reload option)

Change-Id: I9021b28bfe1d2b42f11c09597aaa8bd3d68b1195
This commit is contained in:
Michele Baldessari 2019-08-02 19:21:20 +02:00
parent b30587e94f
commit f4a445aa6e

View File

@ -81,10 +81,6 @@ outputs:
StandardError=syslog
[Install]
WantedBy=basic.target
- name: enable tripleo-iptables service
service:
enabled: yes
name: tripleo-iptables.service
- name: create ip6tables service
copy:
dest: /etc/systemd/system/tripleo-ip6tables.service
@ -103,8 +99,13 @@ outputs:
StandardError=syslog
[Install]
WantedBy=basic.target
- name: enable tripleo-iptables service (and do a daemon-reload systemd)
systemd:
daemon_reload: yes
enabled: yes
name: tripleo-iptables.service
- name: enable tripleo-ip6tables service
service:
systemd:
enabled: yes
name: tripleo-ip6tables.service
upgrade_tasks: