Use systemd module instead of shell
Using ansible systemd module to daemon reload and service reload is the solution for the future. Change-Id: I3f9142357379a548b1e1f4190e61157596f750fa Co-Authored-By: Jean-Philippe Evrard <Jean-Philippe.Evrard@rackspace.co.uk>
This commit is contained in:
parent
9932bab2ee
commit
a89f13c608
|
@ -12,19 +12,14 @@
|
|||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Reload systemd daemon
|
||||
command: "systemctl daemon-reload"
|
||||
notify:
|
||||
- Restart nova services
|
||||
|
||||
- name: Restart libvirt-bin
|
||||
service:
|
||||
systemd:
|
||||
name: "{{ libvirt_service_name }}"
|
||||
state: "restarted"
|
||||
daemon_reload: yes
|
||||
|
||||
- name: Restart nova services
|
||||
service:
|
||||
systemd:
|
||||
name: "{{ item.value.service_name }}"
|
||||
state: "restarted"
|
||||
with_dict: "{{ nova_services }}"
|
||||
|
|
|
@ -118,4 +118,4 @@
|
|||
- nova-config
|
||||
- nova-kvm
|
||||
- nova-libvirt
|
||||
- nova-kvm-virsh-net
|
||||
- nova-kvm-virsh-net
|
||||
|
|
|
@ -63,4 +63,4 @@
|
|||
with_dict: "{{ nova_services }}"
|
||||
when: inventory_hostname in groups[item.value.group]
|
||||
notify:
|
||||
- Reload systemd daemon
|
||||
- Restart nova services
|
||||
|
|
Loading…
Reference in New Issue