diff options
Diffstat (limited to 'roles')
-rw-r--r-- | roles/node-network-manager/tasks/main.yml | 22 | ||||
-rw-r--r-- | roles/openstack-stack/templates/heat_stack.yaml.j2 | 19 |
2 files changed, 31 insertions, 10 deletions
diff --git a/roles/node-network-manager/tasks/main.yml b/roles/node-network-manager/tasks/main.yml new file mode 100644 index 000000000..6a17855e7 --- /dev/null +++ b/roles/node-network-manager/tasks/main.yml @@ -0,0 +1,22 @@ +--- +- name: install NetworkManager + package: + name: NetworkManager + state: present + +- name: configure NetworkManager + lineinfile: + dest: "/etc/sysconfig/network-scripts/ifcfg-{{ ansible_default_ipv4['interface'] }}" + regexp: '^{{ item }}=' + line: '{{ item }}=yes' + state: present + create: yes + with_items: + - 'USE_PEERDNS' + - 'NM_CONTROLLED' + +- name: enable and start NetworkManager + service: + name: NetworkManager + state: restarted + enabled: yes diff --git a/roles/openstack-stack/templates/heat_stack.yaml.j2 b/roles/openstack-stack/templates/heat_stack.yaml.j2 index 8bf76b57c..992f6257b 100644 --- a/roles/openstack-stack/templates/heat_stack.yaml.j2 +++ b/roles/openstack-stack/templates/heat_stack.yaml.j2 @@ -160,7 +160,7 @@ resources: protocol: icmp remote_ip_prefix: {{ ssh_ingress_cidr }} -{% if openstack_flat_secgrp|bool %} +{% if openstack_flat_secgrp|default(False)|bool %} flat-secgrp: type: OS::Neutron::SecurityGroup properties: @@ -432,7 +432,7 @@ resources: port_range_min: 53 port_range_max: 53 remote_ip_prefix: "{{ openstack_subnet_prefix }}.0/24" -{% if num_masters is greaterthan 1 %} +{% if num_masters > 1 %} lb-secgrp: type: OS::Neutron::SecurityGroup properties: @@ -444,7 +444,7 @@ resources: port_range_min: {{ openshift_master_api_port | default(8443) }} port_range_max: {{ openshift_master_api_port | default(8443) }} remote_ip_prefix: {{ lb_ingress_cidr }} - {% if openshift_master_console_port is defined and openshift_master_console_port is not equalto openshift_master_api_port %} + {% if openshift_master_console_port is defined and openshift_master_console_port != openshift_master_api_port %} - direction: ingress protocol: tcp port_range_min: {{ openshift_master_console_port | default(8443) }} @@ -481,7 +481,7 @@ resources: net: { get_resource: net } subnet: { get_resource: subnet } secgrp: - - { get_resource: {% if openstack_flat_secgrp|bool %}flat-secgrp{% else %}etcd-secgrp{% endif %} } + - { get_resource: {% if openstack_flat_secgrp|default(False)|bool %}flat-secgrp{% else %}etcd-secgrp{% endif %} } - { get_resource: common-secgrp } floating_network: {{ external_network }} net_name: @@ -493,7 +493,7 @@ resources: depends_on: - interface -{% if num_masters is greaterthan 1 %} +{% if num_masters > 1 %} loadbalancer: type: OS::Heat::ResourceGroup properties: @@ -563,12 +563,12 @@ resources: net: { get_resource: net } subnet: { get_resource: subnet } secgrp: -{% if openstack_flat_secgrp|bool %} +{% if openstack_flat_secgrp|default(False)|bool %} - { get_resource: flat-secgrp } {% else %} - { get_resource: master-secgrp } - { get_resource: node-secgrp } -{% if num_etcd is equalto 0 %} +{% if num_etcd == 0 %} - { get_resource: etcd-secgrp } {% endif %} {% endif %} @@ -617,7 +617,7 @@ resources: net: { get_resource: net } subnet: { get_resource: subnet } secgrp: - - { get_resource: {% if openstack_flat_secgrp|bool %}flat-secgrp{% else %}node-secgrp{% endif %} } + - { get_resource: {% if openstack_flat_secgrp|default(False)|bool %}flat-secgrp{% else %}node-secgrp{% endif %} } - { get_resource: common-secgrp } floating_network: {{ external_network }} net_name: @@ -662,7 +662,7 @@ resources: subnet: { get_resource: subnet } secgrp: # TODO(bogdando) filter only required node rules into infra-secgrp -{% if openstack_flat_secgrp|bool %} +{% if openstack_flat_secgrp|default(False)|bool %} - { get_resource: flat-secgrp } {% else %} - { get_resource: node-secgrp } @@ -718,4 +718,3 @@ resources: volume_size: {{ dns_volume_size }} depends_on: - interface - |