summaryrefslogtreecommitdiffstats
path: root/xci/playbooks/roles/configure-network/tasks
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2017-08-24 13:33:38 +0100
committerMarkos Chandras <mchandras@suse.de>2017-08-25 10:31:53 +0100
commite8f6f7180dc5d78520d3ab298f279a8dd1b8795b (patch)
tree3a5191018cebbe20ae48512d6260748893953721 /xci/playbooks/roles/configure-network/tasks
parent5ea26a2277389ec42b6f22e02dbd4c04796ee304 (diff)
xci: playbooks: configure-network: Prepare for multi-distro support
Move the network templates inside the role since it's their only user. Moreover, remove the arguments when we include the role in playbooks and move the distro logic to the role itself. Change-Id: I938686fdb31b9896b9e97339799a0edd4c34bf36 Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'xci/playbooks/roles/configure-network/tasks')
-rw-r--r--xci/playbooks/roles/configure-network/tasks/main.yml6
1 files changed, 3 insertions, 3 deletions
diff --git a/xci/playbooks/roles/configure-network/tasks/main.yml b/xci/playbooks/roles/configure-network/tasks/main.yml
index aafadf71..df1580e5 100644
--- a/xci/playbooks/roles/configure-network/tasks/main.yml
+++ b/xci/playbooks/roles/configure-network/tasks/main.yml
@@ -27,8 +27,8 @@
shell: "/bin/rm -rf /etc/network/interfaces.d/*"
- name: ensure interfaces file is updated
template:
- src: "{{ src }}"
- dest: "{{ dest }}"
+ src: "{{ ansible_os_family | lower }}/{{ ansible_hostname }}.interface.j2"
+ dest: "/etc/network/interfaces"
- name: restart network service
shell: "/sbin/ifconfig {{ interface }} 0 && /sbin/ifdown -a && /sbin/ifup -a"
- when: ansible_distribution_release == "xenial"
+ when: ansible_os_family | lower == "debian"