diff --git a/defaults/main.yml b/defaults/main.yml index 89c7c135d..2cd26c954 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -38,6 +38,10 @@ upgrade_log: overcloud_upgrade_console.log undercloud_upgrade_log: undercloud_upgrade_console.log # user: undercloud_upgrade_user: stack +# Deployment type could: +# - virtual +# - baremetal +deployment_type: virtual # override those lists with your templates that your env needs for upgrade # example: # upgrade_custom_templates_script_delivery: diff --git a/playbooks/upgrade-baremetal.yml b/playbooks/upgrade-baremetal.yml new file mode 100644 index 000000000..6add553b1 --- /dev/null +++ b/playbooks/upgrade-baremetal.yml @@ -0,0 +1,9 @@ +--- +# Upgrade Undercloud and Overcloud on top of a quickstart Baremetal deployment +- include: baremetal-virt-undercloud-tripleo.yml + +- name: Upgrade Tripleo + hosts: undercloud + gather_facts: no + roles: + - { role: tripleo-overcloud-upgrade, deployment_type: baremetal } diff --git a/tasks/pre-overcloud.yml b/tasks/pre-overcloud.yml index 9c0921fed..ea014ca6b 100644 --- a/tasks/pre-overcloud.yml +++ b/tasks/pre-overcloud.yml @@ -28,7 +28,7 @@ sudo iptables -A BOOTSTACK_MASQ -s {{ network_isolation_ipv4_cidr }} ! \ -d {{ network_isolation_ipv4_cidr }} -j MASQUERADE -t nat; sudo iptables-save > /etc/sysconfig/iptables; - when: network_isolation + when: network_isolation|bool and deployment_type == "virtual" - name: Create major overcloud upgrade script when: major_upgrade diff --git a/tasks/upgrade-undercloud.yml b/tasks/upgrade-undercloud.yml index b841df4b8..ff47ecaf1 100644 --- a/tasks/upgrade-undercloud.yml +++ b/tasks/upgrade-undercloud.yml @@ -15,11 +15,11 @@ ovs-vsctl add-port br-ctlplane {{ network_isolation_vlan }} tag={{ network_isolation_vlan_tag }} \ -- set interface {{ network_isolation_vlan }} type=internal; fi - when: network_isolation + when: network_isolation|bool and deployment_type == "virtual" - name: set vlan up ignore_errors: yes sudo: yes shell: > ip l set dev {{ network_isolation_vlan }} up; ip addr add {{ network_isolation_ipv4_cidr }} dev {{ network_isolation_vlan }}; - when: network_isolation + when: network_isolation|bool and deployment_type == "virtual"