summaryrefslogtreecommitdiffstats
path: root/playbooks/provisioning/openstack/post-provision-openstack.yml
diff options
context:
space:
mode:
authorTomas Sedovic <tomas@sedovic.cz>2017-10-18 14:00:50 +0200
committerTomas Sedovic <tomas@sedovic.cz>2017-10-18 14:00:50 +0200
commit9f69f214958e1c33bf1c082cd7243dca4e8eebb8 (patch)
tree8f3f9b8a89729ade9c482b39a8f630636a341b7c /playbooks/provisioning/openstack/post-provision-openstack.yml
parent255bda6812c53d39723d0ad2b27698e2d627f3bd (diff)
parent3823c72af11f77b9639176921b398fbab2ac04fd (diff)
downloadopenshift-9f69f214958e1c33bf1c082cd7243dca4e8eebb8.tar.gz
openshift-9f69f214958e1c33bf1c082cd7243dca4e8eebb8.tar.bz2
openshift-9f69f214958e1c33bf1c082cd7243dca4e8eebb8.tar.xz
openshift-9f69f214958e1c33bf1c082cd7243dca4e8eebb8.zip
Merge branch 'master' into openstack-docs
Diffstat (limited to 'playbooks/provisioning/openstack/post-provision-openstack.yml')
-rw-r--r--playbooks/provisioning/openstack/post-provision-openstack.yml25
1 files changed, 25 insertions, 0 deletions
diff --git a/playbooks/provisioning/openstack/post-provision-openstack.yml b/playbooks/provisioning/openstack/post-provision-openstack.yml
index a80e8d829..e460fbf12 100644
--- a/playbooks/provisioning/openstack/post-provision-openstack.yml
+++ b/playbooks/provisioning/openstack/post-provision-openstack.yml
@@ -76,6 +76,16 @@
hosts: OSEv3
gather_facts: true
become: true
+ vars:
+ interface: "{{ flannel_interface|default('eth1') }}"
+ interface_file: /etc/sysconfig/network-scripts/ifcfg-{{ interface }}
+ interface_config:
+ DEVICE: "{{ interface }}"
+ TYPE: Ethernet
+ BOOTPROTO: dhcp
+ ONBOOT: 'yes'
+ DEFTROUTE: 'no'
+ PEERDNS: 'no'
pre_tasks:
- name: "Include DNS configuration to ensure proper name resolution"
lineinfile:
@@ -83,6 +93,21 @@
dest: /etc/sysconfig/network
regexp: "IP4_NAMESERVERS={{ hostvars['localhost'].private_dns_server }}"
line: "IP4_NAMESERVERS={{ hostvars['localhost'].private_dns_server }}"
+ - name: "Configure the flannel interface options"
+ when: openshift_use_flannel|default(False)|bool
+ block:
+ - file:
+ dest: "{{ interface_file }}"
+ state: touch
+ mode: 0644
+ owner: root
+ group: root
+ - lineinfile:
+ state: present
+ dest: "{{ interface_file }}"
+ regexp: "{{ item.key }}="
+ line: "{{ item.key }}={{ item.value }}"
+ with_dict: "{{ interface_config }}"
roles:
- node-network-manager