X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=lib%2Fansible%2Fplaybooks%2Fconfigure_undercloud.yml;h=f1878e81512cdd96b536ee49507f3fdfcdffc75b;hb=ae22c3358b53a68b68de7d3ac5d6f56a1c384b61;hp=91a8f9a4d0d63106eecc3702d9fb58558eaf6405;hpb=2ecb25bea8dbb8abc7bd4f90f07101b40e70363b;p=apex.git diff --git a/lib/ansible/playbooks/configure_undercloud.yml b/lib/ansible/playbooks/configure_undercloud.yml index 91a8f9a4..f1878e81 100644 --- a/lib/ansible/playbooks/configure_undercloud.yml +++ b/lib/ansible/playbooks/configure_undercloud.yml @@ -16,7 +16,7 @@ src: /root/.ssh/id_rsa.pub dest: /home/stack/jumphost_id_rsa.pub owner: stack - owner: stack + group: stack mode: 0644 - copy: src: "{{ apex_temp_dir }}/{{ item }}.yaml" @@ -32,16 +32,30 @@ regexp: 'Defaults\s*requiretty' state: absent become: yes + - lineinfile: + path: /etc/environment + regexp: '^http_proxy' + line: "http_proxy={{ http_proxy }}" + become: yes + when: http_proxy + - lineinfile: + path: /etc/environment + regexp: '^https_proxy' + line: "https_proxy={{ https_proxy }}" + become: yes + when: https_proxy - name: openstack-configs undercloud shell: openstack-config --set undercloud.conf DEFAULT {{ item }} with_items: "{{ undercloud_config }}" + - name: Add ironic packages + yum: + name: openstack-ironic-api,openstack-ironic-common, + openstack-ironic-inspector + become: yes - name: openstack-configs ironic shell: openstack-config --set /etc/ironic/ironic.conf {{ item }} become: yes with_items: "{{ ironic_config }}" - - name: openstack-configs undercloud aarch64 - shell: openstack-config --set undercloud.conf DEFAULT ipxe_enabled false - when: aarch64 - lineinfile: path: /usr/lib/python2.7/site-packages/ironic/common/pxe_utils.py regexp: '_link_ip_address_pxe_configs' @@ -89,6 +103,15 @@ with_items: - neutron-server - neutron-dhcp-agent + - name: Configure workaround for mariadb long blob (LP#1768913) + shell: openstack-config --set /etc/my.cnf.d/galera.cnf mysqld innodb_log_file_size 256M + become: yes + - name: restart mariadb service + service: + name: mariadb + state: restarted + enabled: yes + become: yes - name: configure external network vlan ifcfg template: src: external_vlan_ifcfg.yml.j2 @@ -134,11 +157,48 @@ - external_network.enabled - aarch64 become: yes + - block: + - name: Undercloud NAT - MASQUERADE interface + iptables: + table: nat + chain: POSTROUTING + out_interface: eth0 + jump: MASQUERADE + - name: Undercloud NAT - MASQUERADE interface with subnet + iptables: + table: nat + chain: POSTROUTING + out_interface: eth0 + jump: MASQUERADE + source: "{{ nat_cidr }}" + - name: Undercloud NAT - Allow Forwarding + iptables: + chain: FORWARD + in_interface: eth2 + jump: ACCEPT + - name: Undercloud NAT - Allow Stateful Forwarding + iptables: + chain: FORWARD + in_interface: eth2 + jump: ACCEPT + source: "{{ nat_cidr }}" + ctstate: ESTABLISHED,RELATED + - name: Undercloud NAT - Save iptables + shell: service iptables save + become: yes + when: + - not nat_network_ipv6 + - nat - name: fetch storage environment file fetch: src: /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml dest: "{{ apex_temp_dir }}/" flat: yes + - name: fetch sriov environment file + fetch: + src: /usr/share/openstack-tripleo-heat-templates/environments/services/neutron-opendaylight-sriov.yaml + dest: "{{ apex_temp_dir }}/" + flat: yes - include: undercloud_aarch64.yml when: aarch64