use become

This commit is contained in:
Robert Kaussow 2018-07-06 23:20:38 +02:00
parent f4121d3163
commit 44263bce25
2 changed files with 45 additions and 46 deletions

View File

@ -17,14 +17,10 @@
listen:
- "host_reboot"
- name: Wait for host
wait_for:
host: "{{ ansible_ssh_host }}"
port: 22
- name: Waiting for host startup
wait_for_connection:
delay: 5
timeout: 300
connection: local
become: False
listen:
- "network_restart"
- "host_reboot"

View File

@ -1,4 +1,6 @@
---
- name: Setup network
block:
- name: Set hostname
template:
src: etc/hostname.j2
@ -42,3 +44,4 @@
owner: root
group: root
mode: 0644
become: True