Fix inventory and bionic dnsmasq start

The inventory was not firing up for python3 as ansible silently
conceals the inventory processing failure.

Change-Id: Ie4149d251500d0414acba794daf918a0167d24e8
This commit is contained in:
Julia Kreger 2020-01-08 10:25:52 -08:00
parent a2b9412c0a
commit 8a13c46c0e
2 changed files with 14 additions and 9 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
#

View File

@ -45,20 +45,25 @@
- name: "Start ironic-api"
service: name=ironic-api state=restarted
# NOTE(Shrews) When testing, we want to use our custom dnsmasq.conf file,
# not the one supplied by libvirt. And the libvirt started dnsmasq processes
# are not controlled by upstart, so we need to manually kill those.
- name: "Stop existing libvirt dnsmasq processes"
command: killall -w dnsmasq
when: testing | bool == true and include_dhcp_server | bool == true
ignore_errors: yes
- name: "Ensure services are running with current config"
service: name={{ item }} state=restarted enabled=yes
with_items:
- xinetd
- nginx
# Multiple dnsmasqs are likely running, so lets tell the service manager
# to at least try stopping dnsmasq for us.
- name: "Stop dnsmasq explicitly."
service: name=dnsmasq state=stopped
# NOTE(Shrews) When testing, we want to use our custom dnsmasq.conf file,
# not the one supplied by libvirt. And the libvirt started dnsmasq processes
# are not controlled by upstart, so we need to manually kill those.
- name: "Stop existing libvirt dnsmasq processes"
command: killall -9 -w dnsmasq
when: testing | bool == true and include_dhcp_server | bool == true
ignore_errors: yes
- name: "Ensure dnsmasq is running with current config"
service: name={{ item }} state=restarted enabled=yes
with_items: