summaryrefslogtreecommitdiffstats
path: root/xci/playbooks/roles/bootstrap-host/tasks/network.yml
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2018-03-26 10:23:13 +0100
committerMarkos Chandras <mchandras@suse.de>2018-03-26 20:47:17 +0100
commit9e1d3d6e62abf5d0da26a296bcd235f37a54d9c6 (patch)
treefc2fb9d8056786b4543379977fb8e72de3f2125b /xci/playbooks/roles/bootstrap-host/tasks/network.yml
parent8f3c33c97acc5fc10a83e7cc7635da67e2460769 (diff)
xci: playbooks: Fixes various ansible-lint warnings
In preparation for adding support for the 'ansible-lint' tool we fix various problems in our playbooks to make the tool happy before we make it mandatory. Some of the problems that are fixed here are - [ANSIBLE0011] All tasks should be named - [ANSIBLE0012] Commands should not change things if nothing needs doing - [ANSIBLE0013] Use shell only when shell functionality is required - [ANSIBLE0010] Package installs should not use latest installer-type:osa deploy-scenario:os-nosdn-nofeature Change-Id: I66c759d3932a414b81b2846393d2d98ce80c0b6d Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'xci/playbooks/roles/bootstrap-host/tasks/network.yml')
-rw-r--r--xci/playbooks/roles/bootstrap-host/tasks/network.yml10
1 files changed, 8 insertions, 2 deletions
diff --git a/xci/playbooks/roles/bootstrap-host/tasks/network.yml b/xci/playbooks/roles/bootstrap-host/tasks/network.yml
index 01edf459..ea9060e6 100644
--- a/xci/playbooks/roles/bootstrap-host/tasks/network.yml
+++ b/xci/playbooks/roles/bootstrap-host/tasks/network.yml
@@ -37,7 +37,12 @@
name: 8021q
state: present
- name: ensure interfaces.d folder is empty
- shell: "/bin/rm -rf /etc/network/interfaces.d/*"
+ file:
+ state: "{{ item }}"
+ path: "/etc/network/interfaces.d"
+ with_items:
+ - absent
+ - directory
- name: ensure interfaces file is updated
template:
src: "{{ ansible_os_family | lower }}/{{ ansible_hostname }}.interface.j2"
@@ -122,7 +127,8 @@
poll: 0
when: ansible_os_family | lower == "redhat"
-- local_action:
+- name: Wait for host to come back to life
+ local_action:
module: wait_for
host: "{{ ansible_host }}"
delay: 15