This commit is contained in:
2024-10-12 19:26:42 +03:00
parent e8ff24dce6
commit 0bb01afc22
2 changed files with 9 additions and 3 deletions

View File

@@ -25,7 +25,7 @@
# Имя lte модема для настройки NetworkManager # Имя lte модема для настройки NetworkManager
LTE_con_name: LTE LTE_con_name: LTE
phy_ints: phy_ints:
# - enp89s0 - enp3s0
- enp4s0 - enp4s0
## dnsmasq ## dnsmasq
# Время аренды в секундах # Время аренды в секундах

View File

@@ -44,13 +44,19 @@
tags: dnsmasq tags: dnsmasq
- name: Get physical interfaces without LTE modem interface - name: Get physical interfaces without LTE modem interface
command: find /sys/class/net -type l -not -lname '*virtual*' -not -name '*wwp*' -printf '%f\n' command: find /sys/class/net -type l -not -lname '*virtual*' -not -name '*wwp*' -not -name '*wlp*' -printf '%f\n'
register: without_lte register: without_lte
changed_when: false changed_when: false
check_mode: false check_mode: false
tags: tags:
- dnsmasq - dnsmasq
- iptables - iptables
- test
- name: find interface facts
debug:
msg: "{{ hostvars[inventory_hostname]['ansible_%s' | format(item)]['ipv4']['address'] | default('No ipv4 address')}} "
loop: "{{ ansible_interfaces }}"
tags: test
- name: Get physical interfaces names WIFI modems - name: Get physical interfaces names WIFI modems
command: find /sys/class/net -type l -lname '*wlp*' -printf '%f\n' command: find /sys/class/net -type l -lname '*wlp*' -printf '%f\n'
@@ -132,7 +138,7 @@
when: nmcli_bridge_failed when: nmcli_bridge_failed
- name: Configure bridge1 - name: Configure bridge1
command: /usr/bin/nmcli c add ipv6.method disabled type bridge-slave con-name 'Ethernet' ifname {{ int_name }} master br0 autoconnect yes save yes command: /usr/bin/nmcli c add ipv6.method disabled type bridge-slave con-name 'Ethernet-{{ int_name }}' ifname {{ int_name }} master br0 autoconnect yes save yes
loop: "{{ phy_ints }}" loop: "{{ phy_ints }}"
loop_control: loop_control:
loop_var: int_name loop_var: int_name