From 3da96de4e9bc9b84301bbfd47a7f592fbf0e64de Mon Sep 17 00:00:00 2001 From: George Hunt Date: Sun, 28 May 2017 06:47:49 -0700 Subject: [PATCH] correct for ubuntu --- roles/httpd/tasks/main.yml | 4 ++-- roles/network/tasks/debian.yml | 10 +++++----- roles/network/templates/network/interfaces.j2 | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/roles/httpd/tasks/main.yml b/roles/httpd/tasks/main.yml index 4ac639fce..19dbe03e6 100644 --- a/roles/httpd/tasks/main.yml +++ b/roles/httpd/tasks/main.yml @@ -19,7 +19,7 @@ tags: - download when: is_ubuntu -+ + - name: Install httpd required packages package: name={{ item }} state=present @@ -36,7 +36,7 @@ file: path=/etc/apache2/sites-enabled/000-default.conf src=/etc/apache2/sites-available/000-default.conf state=absent -+ when: is_debuntu + when: is_debuntu - name: Create httpd config files template: backup=yes diff --git a/roles/network/tasks/debian.yml b/roles/network/tasks/debian.yml index f7fab64df..bfb0af6b9 100644 --- a/roles/network/tasks/debian.yml +++ b/roles/network/tasks/debian.yml @@ -28,11 +28,6 @@ package: name=dhcpcd-dbus state=present -- name: start up the dhcpcd service - service: name=dhcpcd - enabled=True - state=started - - name: for upgrades from earlier 6.2, remove br0 file file: path=/etc/network/interfaces.d/br0 state=absent @@ -47,6 +42,11 @@ src=network/interfaces.j2 register: interface +- name: start up the dhcpcd service + service: name=dhcpcd + enabled=True + state=started + - name: If this was a change, things need to shift service: name=hostapd state=stopped when: interface.changed diff --git a/roles/network/templates/network/interfaces.j2 b/roles/network/templates/network/interfaces.j2 index 3bd2b54aa..5e413fdc3 100644 --- a/roles/network/templates/network/interfaces.j2 +++ b/roles/network/templates/network/interfaces.j2 @@ -7,7 +7,7 @@ source /etc/network/interfaces.d/* auto lo iface lo inet loopback -# gui_desired_network_role is {{ gui_desired_network_role }} +# xsce_network_mode is {{ gui_desired_network_role }} {% if discovered_wireless_iface != 'none' %} # we always want the wireless to be configured (and under bridge) if it exists auto {{ discovered_wireless_iface }} @@ -16,11 +16,11 @@ iface {{discovered_wireless_iface }} inet manual pre-down ifconfig $IFACE down {% endif %} -{% if gui_desired_network_role == "Appliance" %} +{% if xsce_network_mode == "Appliance" %} ################# APPLIANCE ######################### auto {{ discovered_wan_iface }} {% if gui_static_wan == false %} -iface {{ discovered_wan_iface }} inet dhcp +iface {{ discovered_wan_iface }} inet manual {% else %} # gui_static_wan_ip is set iface {{ discovered_wan_iface }} inet static address {{ gui_static_wan_ip }} @@ -29,7 +29,7 @@ iface {{ discovered_wan_iface }} inet static dns-nameservers {{ gui_static_wan_nameserver }} dns-search {{ xsce_domain }} {% endif %} {# end of static_wan #} -{% elif gui_desired_network_role == "Gateway" %} +{% elif xsce_network_mode == "Gateway" %} ################# GATEWAY ######################### auto br0 iface br0 inet static @@ -50,7 +50,7 @@ iface {{ discovered_wan_iface }} inet static dns-search {{ xsce_domain }} post-up systemctl restart dhcpd && systemctl restart hostapd {% endif %} -{% else %} {# end of gui_desired_network_role == Gateway #} +{% else %} {# end of xsce_network_mode == Gateway #} ################# LANCONTROLLER ################### auto br0