This commit is contained in:
vincent 2019-04-11 18:54:12 +02:00
parent b3d90a28a7
commit 5152ee026b
2 changed files with 11 additions and 4 deletions

View File

@ -13,5 +13,5 @@
- name: bridge_enable
become: yes
shell: netctl enable bridge && systemctl disable dhcpcd
shell: netctl enable bridge

View File

@ -15,7 +15,7 @@
- name: Add user to libvirt group
user:
name: '{{ username }}'
name: '{{ user.name }}'
groups: libvirt
append: True
become: yes
@ -35,6 +35,13 @@
template:
dest: /etc/netctl/bridge # required. Location to render the template to on the remote machine.
src: bridge.j2 # required. Path of a Jinja2 formatted template on the Ansible controller. This can be a relative or absolute path.
when: ansible_default_ipv4.type == "ether"
when: ansible_default_ipv4.type == "ether" and "wlp2s0" not in ansible_interfaces
become: yes
notify: bridge_enable
notify: bridge_enable
- name: disable dhcpcd
systemd:
name: dhcpcd # required. Name of the service.
enabled: false
become: yes