summaryrefslogtreecommitdiffstats
path: root/lib/ansible
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2017-08-18 10:53:45 -0400
committerDan Radez <dradez@redhat.com>2017-08-24 19:07:31 -0400
commit98e127b8f2b026355d1438970bbadce2c95898fa (patch)
tree109c0559bdc3aa8cca85d28cf101472a7a287e90 /lib/ansible
parent974e251a7c6461805443e35f78e21a8bfe88a67b (diff)
Updates and additions to handle aarch64
- move patches from x86 only to common virt-customize - updates to undercloud to configure pxe and external network - initial updates to overcloud deploy functions JIRA: APEX-381 Change-Id: I496e196535e63bfd31654d0f501fe3f00fa5ca3f Signed-off-by: Dan Radez <dradez@redhat.com>
Diffstat (limited to 'lib/ansible')
-rw-r--r--lib/ansible/playbooks/configure_undercloud.yml22
-rw-r--r--lib/ansible/playbooks/deploy_overcloud.yml2
-rw-r--r--lib/ansible/playbooks/undercloud_aarch64.yml7
3 files changed, 24 insertions, 7 deletions
diff --git a/lib/ansible/playbooks/configure_undercloud.yml b/lib/ansible/playbooks/configure_undercloud.yml
index 7b236624..aa6c960a 100644
--- a/lib/ansible/playbooks/configure_undercloud.yml
+++ b/lib/ansible/playbooks/configure_undercloud.yml
@@ -41,12 +41,12 @@
with_items: "{{ ironic_config }}"
- name: openstack-configs undercloud aarch64
shell: openstack-config --set undercloud.conf DEFAULT ipxe_enabled false
- when: "{{ aarch64 }}"
+ when: aarch64
- lineinfile:
path: /usr/lib/python2.7/site-packages/ironic/common/pxe_utils.py
regexp: '_link_ip_address_pxe_configs'
line: '_link_mac_pxe_configs(task)'
- when: "{{ aarch64 }}"
+ when: aarch64
- name: undercloud install
shell: openstack undercloud install &> apex-undercloud-install.log
become: yes
@@ -94,17 +94,33 @@
when:
- external_network.vlan != "native"
- external_network.enabled
- - name: assign IP to native eth2
+ - name: assign IP to native eth2
shell: ip a a {{ external_network.ip }}/{{ external_network.prefix }} dev eth2
become: yes
when:
- external_network.vlan == "native"
- external_network.enabled
+ - not aarch64
- name: bring up eth2
shell: ip link set up dev eth2
when:
- external_network.vlan == "native"
- external_network.enabled
+ - not aarch64
+ become: yes
+ - name: assign IP to native eth0 if aarch64
+ shell: ip a a {{ external_network.ip }}/{{ external_network.prefix }} dev eth0
+ become: yes
+ when:
+ - external_network.vlan == "native"
+ - external_network.enabled
+ - aarch64
+ - name: bring up eth0 if aarch64
+ shell: ip link set up dev eth0
+ when:
+ - external_network.vlan == "native"
+ - external_network.enabled
+ - aarch64
become: yes
- name: fetch storage environment file
fetch:
diff --git a/lib/ansible/playbooks/deploy_overcloud.yml b/lib/ansible/playbooks/deploy_overcloud.yml
index 76bbbc67..3313bc87 100644
--- a/lib/ansible/playbooks/deploy_overcloud.yml
+++ b/lib/ansible/playbooks/deploy_overcloud.yml
@@ -41,7 +41,7 @@
shell: "{{ stackrc }} && openstack overcloud node import --provide instackenv.json"
when: virtual
- name: Set flavors
- shell: '{{ stackrc }} && openstack flavor set --property "cpu_arch"="x86_64" {{ item }}'
+ shell: '{{ stackrc }} && openstack flavor set --property "cpu_arch"="{{ ansible_architecture }}" {{ item }}'
with_items:
- baremetal
- control
diff --git a/lib/ansible/playbooks/undercloud_aarch64.yml b/lib/ansible/playbooks/undercloud_aarch64.yml
index 5b607c3e..e8b2818c 100644
--- a/lib/ansible/playbooks/undercloud_aarch64.yml
+++ b/lib/ansible/playbooks/undercloud_aarch64.yml
@@ -14,11 +14,11 @@
mode: 0755
- copy:
content: |
- set default=master
+ set default=local
set timeout=5
set hidden_timeout_quiet=false
- menuentry "master" {
- configfile /tftpboot/\\\$net_default_ip.conf
+ menuentry "local" {
+ configfile (hd0,gpt3)/boot/grub2/grub.cfg
}
dest: /tftpboot/EFI/centos/grub.cfg
mode: 0644
@@ -42,6 +42,7 @@
state: present
line: ''
- shell: "echo 'r ^/EFI/centos/grub.cfg-(.*) /tftpboot/pxelinux.cfg/\\1' | sudo tee --append /tftpboot/map-file"
+ - shell: "echo 'r ^/EFI/centos/grub.cfg /tftpboot/EFI/centos/grub.cfg' | sudo tee --append /tftpboot/map-file"
- systemd:
name: xinetd
state: restarted