Ansible/playbook/roles/vmbr-proxmox/tasks/main.yaml

16 lines
759 B
YAML

- name: Create vmbr1
ansible.builtin.shell:
cmd: echo "auto vmbr1\niface vmbr1 inet static\n\taddress 10.0.0.1/30\n\tbridge-ports none\n\tbridge-stp off\n\tbridge-fd 0" | sudo tee -a /etc/network/interfaces
- name: Create vmbr2
ansible.builtin.shell:
cmd: echo "auto vmbr2\niface vmbr2 inet static\n\taddress "{{ privatip }}.250/24"\n\tbridge-ports none\n\tbridge-stp off\n\tbridge-fd 0" | sudo tee -a /etc/network/interfaces
- name: Create vmbr100
ansible.builtin.shell:
cmd: echo "auto vmbr100\niface vmbr100 inet static\n\taddress 110.1.1.250/24\n\tbridge-ports none\n\tbridge-stp off\n\tbridge-fd 0" | sudo tee -a /etc/network/interfaces
- name: Restart Networking Service
ansible.builtin.shell:
cmd: service networking restart