blob: 4e914749cb736c3fd303a7ed20e08b524409c174 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
---
#- hosts: all
# sudo: yes
# tasks:
- name: "configure interface"
# sudo: True
lineinfile:
dest: "/etc/network/interfaces"
line: "{{ item }}"
with_items:
- "auto {{ contrail_device }}"
- "iface {{ contrail_device }} inet static"
- "\taddress {{ contrail_address }}"
- "\tnetmask {{ contrail_netmask }}"
- name: "set interface address"
# sudo: True
shell: "ifconfig {{ contrail_device }} {{ contrail_address }} netmask {{ contrail_netmask }}"
- name: "up interface"
# sudo: True
shell: "ifconfig {{ contrail_device }} up"
|