Initial commit, squashed
This commit is contained in:
commit
158e8740b8
83 changed files with 2718 additions and 0 deletions
25
roles/firewall/tasks/mgmt.yml
Normal file
25
roles/firewall/tasks/mgmt.yml
Normal file
|
@ -0,0 +1,25 @@
|
|||
- name: Set up management interfaces
|
||||
template:
|
||||
dest: /etc/network/interfaces.d/mgmt.intf
|
||||
src: mgmt.intf.j2
|
||||
mode: 0644
|
||||
register: task_mgmt_interface
|
||||
|
||||
- name: Run SSH in management VRF
|
||||
lineinfile:
|
||||
path: /etc/conf.d/sshd
|
||||
line: "vrf=\"mgmt\""
|
||||
register: task_ssh_vrf
|
||||
|
||||
- name: Reboot for new VRF
|
||||
reboot:
|
||||
when: task_mgmt_interface.changed or task_ssh_vrf.changed
|
||||
register: task_reboot
|
||||
|
||||
- name: Reset the connection
|
||||
meta: reset_connection
|
||||
|
||||
- name: Wait for the network device to reload
|
||||
wait_for_connection:
|
||||
delay: 10
|
||||
when: task_reboot.changed
|
Loading…
Add table
Add a link
Reference in a new issue