WIP
This commit is contained in:
@@ -1,38 +1,41 @@
|
|||||||
---
|
---
|
||||||
# tasks file for network-manager
|
# tasks file for network-manager
|
||||||
- name: "apt install NetworkManager {{ nm_version }} "
|
#- name: "apt install NetworkManager {{ nm_version }} "
|
||||||
apt:
|
# apt:
|
||||||
name: "network-manager{{ nm_version }}"
|
# name: "network-manager{{ nm_version }}"
|
||||||
default_release: "{{ ansible_distribution_release }}-backports"
|
# default_release: "{{ ansible_distribution_release }}-backports"
|
||||||
autoremove: true
|
# autoremove: true
|
||||||
update_cache: true
|
# update_cache: true
|
||||||
|
#
|
||||||
- name: config globally managed devices
|
#- name: config globally managed devices
|
||||||
template:
|
# template:
|
||||||
src: "conf.d/10-globally-managed-devices.j2"
|
# src: "conf.d/10-globally-managed-devices.j2"
|
||||||
dest: "{{ globally_managed_devices_path }}"
|
# dest: "{{ globally_managed_devices_path }}"
|
||||||
owner: root
|
# owner: root
|
||||||
group: root
|
# group: root
|
||||||
mode: 0644
|
# mode: 0644
|
||||||
when: globally_managed_devices is true
|
# when: globally_managed_devices is true
|
||||||
|
#
|
||||||
- name: cleanup globally managed devices
|
#- name: cleanup globally managed devices
|
||||||
file:
|
# file:
|
||||||
path: "{{ globally_managed_devices_path }}"
|
# path: "{{ globally_managed_devices_path }}"
|
||||||
state: absent
|
# state: absent
|
||||||
when: not globally_managed_devices
|
# when: not globally_managed_devices
|
||||||
|
#
|
||||||
- name: Include tasks for checking and removing udev rules
|
#- name: Include tasks for checking and removing udev rules
|
||||||
include_tasks: check_udev_rules.yml
|
# include_tasks: check_udev_rules.yml
|
||||||
|
|
||||||
- name: Configure NetworkManager
|
- name: Configure NetworkManager
|
||||||
community.general.nmcli:
|
community.general.nmcli:
|
||||||
|
autoconnect: "{{ connection.autoconnect | default('true') }}"
|
||||||
conn_name: "{{ connection.con_name }}"
|
conn_name: "{{ connection.con_name }}"
|
||||||
ifname: "{{ connection.ifname }}"
|
ifname: "{{ connection.ifname }}"
|
||||||
type: "{{ connection.type }}"
|
type: "{{ connection.type }}"
|
||||||
ip4: "{{ connection.ip4 }}"
|
# ip4: "{{ connection.ip4 | default('') }}"
|
||||||
gw4: "{{ connection.gw4 | default('') }}"
|
# gw4: "{{ connection.gw4 | default('') }}"
|
||||||
dns4: "{{ connection.dns4 | default([]) }}"
|
dns4: "{{ connection.dns4 | default([]) }}"
|
||||||
|
# routes4: "{{ connection.routes4 | default([]) }}"
|
||||||
|
method4: "{{ connection.method4 | default('manual') }}"
|
||||||
method6: "{{ connection.method6 | default('auto') }}"
|
method6: "{{ connection.method6 | default('auto') }}"
|
||||||
state: present
|
state: present
|
||||||
with_items: "{{ network }}"
|
with_items: "{{ network }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user