mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
2 vars in detected_network.yml to netplan.yml; FULL/PATHS for 1-prep
This commit is contained in:
parent
7d0bf6c1ef
commit
556db4bfb6
5 changed files with 43 additions and 31 deletions
|
@ -36,25 +36,22 @@
|
|||
device_gw: "{{ discovered_wan_iface }}"
|
||||
when: ansible_default_ipv4.gateway is defined
|
||||
|
||||
- name: Figure out netplan file name
|
||||
shell: ls /etc/netplan
|
||||
register: netplan
|
||||
ignore_errors: True # pre 17.10 doesn't use netplan
|
||||
when: is_ubuntu
|
||||
# 2022-07-22: Moved to netplan.yml
|
||||
# - name: Figure out netplan file name
|
||||
# shell: ls /etc/netplan
|
||||
# register: netplan
|
||||
# ignore_errors: True # pre 17.10 doesn't use netplan
|
||||
# when: is_ubuntu
|
||||
|
||||
- name: Setting dhcpcd_test results
|
||||
set_fact:
|
||||
dhcpcd_result: "{{ ansible_local.local_facts.dhcpcd }}"
|
||||
|
||||
- name: Setting systemd_networkd results
|
||||
# 2022-07-22: Copied to netplan.yml (REMOVE DUPLICATE CODE LATER?!)
|
||||
- name: "Set 'systemd_networkd_active: True' if local_facts.systemd_networkd confirms"
|
||||
set_fact:
|
||||
systemd_networkd_active: True
|
||||
when: 'ansible_local.local_facts.systemd_networkd == "enabled"'
|
||||
|
||||
- name: Setting systemd_networkd-2 results
|
||||
set_fact:
|
||||
systemd_networkd_active: True
|
||||
when: 'ansible_local.local_facts.systemd_networkd == "enabled-runtime"'
|
||||
when: ansible_local.local_facts.systemd_networkd == "enabled" or ansible_local.local_facts.systemd_networkd == "enabled-runtime"
|
||||
|
||||
- name: Setting network_manager results
|
||||
set_fact:
|
||||
|
|
|
@ -96,8 +96,8 @@
|
|||
dest: /usr/bin/
|
||||
mode: 0755
|
||||
with_items:
|
||||
- gateway/iiab-internet-on
|
||||
- gateway/iiab-internet-off
|
||||
- roles/network/templates/gateway/iiab-internet-on # Invoked by 1-prep (so full path needed)
|
||||
- roles/network/templates/gateway/iiab-internet-off # Invoked by 1-prep (so full path needed)
|
||||
|
||||
- name: 'Install /usr/local/sbin/netwarn for pop-ups on boot, if iiab-network should be run'
|
||||
include_tasks: roles/network/tasks/netwarn.yml # Invoked by 1-prep (so full path needed)
|
||||
|
|
|
@ -25,21 +25,23 @@
|
|||
include_tasks: install.yml
|
||||
when: network_install and network_installed is undefined
|
||||
|
||||
- name: Create /usr/bin/iiab-hotspot-on from template
|
||||
template:
|
||||
src: hostapd/iiab-hotspot-on
|
||||
dest: /usr/bin/iiab-hotspot-on
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0755
|
||||
|
||||
- name: Create /usr/bin/iiab-hotspot-off from template
|
||||
template:
|
||||
src: hostapd/iiab-hotspot-off
|
||||
dest: /usr/bin/iiab-hotspot-off
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0755
|
||||
# 2022-07-22: Should be done in install.yml above (avoid duplication if poss?)
|
||||
#
|
||||
# - name: Create /usr/bin/iiab-hotspot-on from template
|
||||
# template:
|
||||
# src: hostapd/iiab-hotspot-on
|
||||
# dest: /usr/bin/iiab-hotspot-on
|
||||
# owner: root
|
||||
# group: root
|
||||
# mode: 0755
|
||||
#
|
||||
# - name: Create /usr/bin/iiab-hotspot-off from template
|
||||
# template:
|
||||
# src: hostapd/iiab-hotspot-off
|
||||
# dest: /usr/bin/iiab-hotspot-off
|
||||
# owner: root
|
||||
# group: root
|
||||
# mode: 0755
|
||||
|
||||
- name: Configuring Network if enabled
|
||||
block:
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
# 2022-07-22: Moved from detected_network.yml
|
||||
- name: Figure out netplan file name
|
||||
shell: ls /etc/netplan
|
||||
register: netplan
|
||||
#ignore_errors: True # pre 17.10 doesn't use netplan
|
||||
|
||||
# 2022-07-22: Copied from detected_network.yml (REMOVE DUPLICATE CODE LATER?!)
|
||||
- name: "Set 'systemd_networkd_active: True' if local_facts.systemd_networkd confirms"
|
||||
set_fact:
|
||||
systemd_networkd_active: True
|
||||
when: ansible_local.local_facts.systemd_networkd == "enabled" or ansible_local.local_facts.systemd_networkd == "enabled-runtime"
|
||||
|
||||
|
||||
- name: Disable cloud-init the easy way
|
||||
shell: touch /etc/cloud/cloud-init.disabled
|
||||
when: item|trim == "50-cloud-init.yaml"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
- name: 'Install from template: /usr/share/mate/autostart/netwarn-iiab-network.desktop'
|
||||
template:
|
||||
src: netwarn/netwarn-iiab-network.desktop
|
||||
src: roles/network/templates/netwarn/netwarn-iiab-network.desktop # Invoked by 1-prep (so full path needed)
|
||||
dest: /usr/share/mate/autostart/
|
||||
when: mate_dir.stat.exists and mate_dir.stat.isdir
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
|||
|
||||
- name: 'If a supported graphical OS is detected, install from template: /usr/local/sbin/netwarn'
|
||||
template:
|
||||
src: netwarn/netwarn
|
||||
src: roles/network/templates/netwarn/netwarn # Invoked by 1-prep (so full path needed)
|
||||
dest: /usr/local/sbin/
|
||||
mode: 0755
|
||||
when: lxde_pi_autostart_present or (mate_dir.stat.exists and mate_dir.stat.isdir)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue