1801565a75
These work the same way as upgrade_tasks *but* they use a step variable instead of tags, so we can iterate over a count/sequence which isn't possibly via a wrapper playbook with tags (we may want to align upgrade tasks with the same approach if this works out well). Note the tasks can be run via ansible-playbook on the undercloud, like: openstack overcloud config download --config-dir tmpconfig cd tmpconfig/tripleo-HCrDA6-config ansible-playbook -b -i /usr/bin/tripleo-ansible-inventory update_steps_playbook.yaml --limit controller The above will do a rolling update for the Controller role (note the inconsistent capitalization, we probably need to fix the group naming in tripleo-ansible-inventory) because we specify serial: 1 in the playbook. You can also trigger an update explicitly on one node like this, which is useful for debugging: ansible-playbook -vvv -b -i /usr/bin/tripleo-ansible-inventory update_steps_playbook.yaml --limit overcloud-controller-0 Change-Id: I20bb3e26ab9d9cadf1a31fd304de8a014a901aa9
63 lines
1.9 KiB
YAML
63 lines
1.9 KiB
YAML
heat_template_version: pike
|
|
|
|
description: >
|
|
TripleO Package installation settings
|
|
|
|
parameters:
|
|
ServiceData:
|
|
default: {}
|
|
description: Dictionary packing service data
|
|
type: json
|
|
ServiceNetMap:
|
|
default: {}
|
|
description: Mapping of service_name -> network name. Typically set
|
|
via parameter_defaults in the resource registry. This
|
|
mapping overrides those in ServiceNetMapDefaults.
|
|
type: json
|
|
DefaultPasswords:
|
|
default: {}
|
|
type: json
|
|
RoleName:
|
|
default: ''
|
|
description: Role name on which the service is applied
|
|
type: string
|
|
RoleParameters:
|
|
default: {}
|
|
description: Parameters specific to the role
|
|
type: json
|
|
EndpointMap:
|
|
default: {}
|
|
description: Mapping of service endpoint -> protocol. Typically set
|
|
via parameter_defaults in the resource registry.
|
|
type: json
|
|
EnablePackageInstall:
|
|
default: 'false'
|
|
description: Set to true to enable package installation at deploy time
|
|
type: boolean
|
|
|
|
outputs:
|
|
role_data:
|
|
description: Role data for the TripleO package settings
|
|
value:
|
|
service_name: tripleo_packages
|
|
config_settings:
|
|
tripleo::packages::enable_install: {get_param: EnablePackageInstall}
|
|
step_config: |
|
|
include ::tripleo::packages
|
|
upgrade_tasks:
|
|
- name: Check yum for rpm-python present
|
|
tags: step0
|
|
yum: "name=rpm-python state=present"
|
|
register: rpm_python_check
|
|
- name: Fail when rpm-python wasn't present
|
|
fail: msg="rpm-python package was not present before this run! Check environment before re-running"
|
|
when: rpm_python_check.changed != false
|
|
tags: step0
|
|
- name: Update all packages
|
|
tags: step3
|
|
yum: name=* state=latest
|
|
update_tasks:
|
|
- name: Update all packages
|
|
yum: name=* state=latest
|
|
when: step == "3"
|