diff --git a/roles/copr/backend/files/ifcfg-eth1 b/roles/copr/backend/files/ifcfg-eth1 new file mode 100644 index 0000000000..1da1038261 --- /dev/null +++ b/roles/copr/backend/files/ifcfg-eth1 @@ -0,0 +1,7 @@ +BOOTPROTO=dhcp +TYPE=Ethernet +DEVICE="eth1" +PEERDNS=no +IPV6INIT=no +ONBOOT=yes +USERCTL=no diff --git a/roles/copr/backend/tasks/main.yml b/roles/copr/backend/tasks/main.yml index e3905c4c18..ca98d32a70 100644 --- a/roles/copr/backend/tasks/main.yml +++ b/roles/copr/backend/tasks/main.yml @@ -3,6 +3,9 @@ include: "mount_fs.yml" when: not devel +- name: setup networking + include: "network.yml" + - name: add packages for copr backend yum: state=present name={{ item }} enablerepo="updates-testing" with_items: diff --git a/roles/copr/backend/tasks/network.yml b/roles/copr/backend/tasks/network.yml new file mode 100644 index 0000000000..6ac5f1372b --- /dev/null +++ b/roles/copr/backend/tasks/network.yml @@ -0,0 +1,9 @@ +- name: copy ifcfg-eth1 + template: src="ifcfg-eth1" dest=/etc/sysconfig/network-scripts/ owner=root group=root mode=644 + notify: + - restart network + +- name: set up gateway + lineinfile: dest=/etc/sysconfig/network line="GATEWAYDEV=eth0" + notify: + - restart network