servers/roles/debian/tasks/mgmt.yml

40 lines
890 B
YAML
Raw Normal View History

- name: Add rules to rename network interfaces
template:
dest: /etc/udev/rules.d/10-network.rules
src: 10-network.rules.j2
mode: 0644
notify: reboot
- name: Set up management interface
template:
dest: /etc/network/interfaces
src: interfaces.j2
mode: 0644
notify: reboot
- name: Install ifupdown2
package: name=ifupdown2
notify: reboot
- name: Create override directory for ssh service
file:
path: /etc/systemd/system/ssh.service.d
state: directory
- name: Set up ssh to run in mgmt VRF
copy:
dest: /etc/systemd/system/ssh.service.d/override.conf
src: ssh.service-override.conf
notify: reboot
# With PAM enabled, login shell would run in default VRF instead of mgmt.
- name: Disable PAM for ssh
lineinfile:
path: /etc/ssh/sshd_config
regexp: '^UsePAM .*yes'
state: absent
notify: reboot
- meta: flush_handlers