Skip to content
Snippets Groups Projects

Disable interface

Merged Simon Michnowicz requested to merge disable_interface into master
3 files
+ 42
0
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 16
0
---
# This role adds a sytemd services file and enables it
# It disables the {{ interface_name }} interface (Management port) on Baremetal nodes
- set_fact: interface_name="e1p1"
when: interface_name is undefined
- name: Create service file for turning off interace name
template: src=disable_interface.service.j2 dest=/etc/systemd/system/disable_interface.service mode="u=rw,g=r,o=r"
become: true
become_user: root
- name: enable and start device_off service
service: name=disable_interface.service state=started enabled=yes
become: true
become_user: root
Loading