configure eth1 on compute node

This commit is contained in:
Miroslav Suchý 2014-09-23 08:55:26 +00:00
parent 80d9b494fd
commit 66c7e2d8a1
2 changed files with 16 additions and 0 deletions

View file

@ -98,6 +98,9 @@
- name: restart netapproute
action: command /etc/sysconfig/network-scripts/ifup-routes eth1
- name: restart network
action: service name=network state=restarted
- name: restart unbound
action: service name=unbound state=restarted

View file

@ -29,6 +29,19 @@
- authorized_key: user=root key="{{ lookup('file', files + '/fedora-cloud/fed09-ssh-key.pub') }}"
- lineinfile: dest=/etc/sysconfig/network-scripts/ifcfg-eth1 regexp="^ONBOOT=" line="ONBOOT=yes"
notify:
- restart network
- lineinfile: dest=/etc/sysconfig/network-scripts/ifcfg-eth1 regexp="^NETMASK=" line="NETMASK=255.255.255.0"
notify:
- restart network
- lineinfile: dest=/etc/sysconfig/network-scripts/ifcfg-eth1 regexp="^IPADDR=" line="IPADDR={{compute_private_ip}}"
notify:
- restart network
- lineinfile: dest=/etc/sysconfig/network-scripts/ifcfg-eth1 regexp="BOOTPROTO=" line="BOOTPROTO=none"
notify:
- restart network
- yum: state=present name=http://rdo.fedorapeople.org/rdo-release.rpm
# http://docs.openstack.org/icehouse/install-guide/install/yum/content/nova-compute.html