Zack Williams | ba5549c | 2017-03-25 15:04:45 -0700 | [diff] [blame] | 1 | --- |
| 2 | # interface-config/tasks/main.yml |
| 3 | |
| 4 | - name: Create network interface for management network |
| 5 | template: |
| 6 | src: eth.cfg.j2 |
| 7 | dest: "/etc/network/interfaces.d/{{ mgmt_interface }}.cfg" |
| 8 | owner: root |
| 9 | group: root |
| 10 | mode: 0644 |
| 11 | register: mgmtint_config |
| 12 | |
| 13 | - name: Bring up management network if reconfigured |
| 14 | when: mgmtint_config.changed |
| 15 | command: "ifup {{ mgmt_interface }}" |
| 16 | tags: |
| 17 | - skip_ansible_lint # needs to be run before next steps |
| 18 | |