.
This commit is contained in:
parent
de1f37983b
commit
7f0b81f7ac
@ -6,7 +6,7 @@ Set {{ pillar['network']['wireless'] }} to not be managed by NetworkManager:
|
|||||||
Delete {{ pillar['network']['interface'] }} connection:
|
Delete {{ pillar['network']['interface'] }} connection:
|
||||||
cmd.run:
|
cmd.run:
|
||||||
- name: nmcli connection delete {{ pillar['network']['interface'] }}
|
- name: nmcli connection delete {{ pillar['network']['interface'] }}
|
||||||
- unless: nmcli connection show {{ pillar['network']['interface'] }} > /dev/null
|
- onlyif: nmcli connection show {{ pillar['network']['interface'] }} > /dev/null
|
||||||
|
|
||||||
Install hostapd:
|
Install hostapd:
|
||||||
pkg.installed:
|
pkg.installed:
|
||||||
|
@ -2,6 +2,7 @@ base:
|
|||||||
'*':
|
'*':
|
||||||
- hosts
|
- hosts
|
||||||
- vlan
|
- vlan
|
||||||
|
- hostapd
|
||||||
- firewalld
|
- firewalld
|
||||||
- ssh
|
- ssh
|
||||||
- chrony
|
- chrony
|
||||||
@ -13,5 +14,4 @@ base:
|
|||||||
- podman
|
- podman
|
||||||
- docker.registry
|
- docker.registry
|
||||||
- remote-desktop
|
- remote-desktop
|
||||||
- hostapd
|
|
||||||
- wol
|
- wol
|
||||||
|
@ -8,12 +8,12 @@ create device {{ ifname }}:
|
|||||||
set ip address on {{ ifname }}:
|
set ip address on {{ ifname }}:
|
||||||
cmd.run:
|
cmd.run:
|
||||||
- name: nmcli connection modify {{ ifname }} ipv4.addresses {{ vlan['address'] }}/24
|
- name: nmcli connection modify {{ ifname }} ipv4.addresses {{ vlan['address'] }}/24
|
||||||
- unless: bash -c "if [[ \"$(nmcli connection show Wired\ connection\ 1 | sed -n 's/^ipv4.addresses.\s*\(.*\)$/\1/p')\" == "{{ vlan['address'] }}/24" ]]; then exit 0; else exit 1;fi"
|
- unless: bash -c "if [[ \"$(nmcli connection show {{ ifname }} | sed -n 's/^ipv4.addresses.\s*\(.*\)$/\1/p')\" == "{{ vlan['address'] }}/24" ]]; then exit 0; else exit 1;fi"
|
||||||
|
|
||||||
set ip static on {{ ifname }}:
|
set ip static on {{ ifname }}:
|
||||||
cmd.run:
|
cmd.run:
|
||||||
- name: nmcli connection modify {{ ifname }} ipv4.method manual
|
- name: nmcli connection modify {{ ifname }} ipv4.method manual
|
||||||
- unless: bash -c "if [[ \"$(nmcli connection show Wired\ connection\ 1 | sed -n 's/^ipv4.method.\s*\(.*\)$/\1/p')\" == "manual" ]]; then exit 0; else exit 1;fi"
|
- unless: bash -c "if [[ \"$(nmcli connection show {{ ifname }} | sed -n 's/^ipv4.method.\s*\(.*\)$/\1/p')\" == "manual" ]]; then exit 0; else exit 1;fi"
|
||||||
|
|
||||||
bring up {{ ifname }}:
|
bring up {{ ifname }}:
|
||||||
cmd.run:
|
cmd.run:
|
||||||
|
Loading…
Reference in New Issue
Block a user