From e8f6f7180dc5d78520d3ab298f279a8dd1b8795b Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Thu, 24 Aug 2017 13:33:38 +0100 Subject: 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 --- xci/playbooks/roles/configure-network/tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xci/playbooks/roles/configure-network/tasks') 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" -- cgit 1.2.3-korg