2017-09-04 08:31:57 +02:00
heat_template_version : queens
2016-08-15 15:11:38 -04:00
description : >
TripleO Package installation settings
parameters :
2017-06-22 17:25:03 +02:00
ServiceData :
default : {}
description : Dictionary packing service data
type : json
2016-08-11 23:07:46 +02:00
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
2016-08-17 09:26:05 -04:00
DefaultPasswords :
default : {}
type : json
2017-02-24 06:27:58 -05:00
RoleName :
default : ''
description : Role name on which the service is applied
type : string
RoleParameters :
default : {}
description : Parameters specific to the role
type : json
2016-08-15 15:11:38 -04:00
EndpointMap :
default : {}
description : Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
type : json
EnablePackageInstall :
default : 'false'
2017-06-27 10:01:31 -05:00
description : Set to true to enable package installation at deploy time
2016-08-15 15:11:38 -04:00
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
2016-12-01 10:00:57 +00:00
upgrade_tasks :
2016-12-08 15:04:48 +02:00
- 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
2017-11-06 11:22:54 +01:00
- name : Check for os-net-config upgrade
2017-11-23 16:13:49 +01:00
shell : "yum check-upgrade | awk '/os-net-config/{print}'"
2017-11-06 11:22:54 +01:00
register : os_net_config_need_upgrade
tags : step3
- name : Check that os-net-config has configuration
shell : test -s /etc/os-net-config/config.json
register : os_net_config_has_config
2017-11-20 13:08:17 -05:00
ignore_errors : True
2017-11-06 11:22:54 +01:00
tags : step3
2017-10-03 17:59:19 +02:00
- block :
- name : Upgrade os-net-config
yum : name=os-net-config state=latest
- name : take new os-net-config parameters into account now
command : os-net-config --no-activate -c /etc/os-net-config/config.json -v --detailed-exit-codes
register : os_net_config_upgrade
failed_when : os_net_config_upgrade.rc not in [0,2]
changed_when : os_net_config_upgrade.rc == 2
tags : step3
2017-11-23 15:33:20 +01:00
when : os_net_config_need_upgrade.stdout and os_net_config_has_config.rc == 0
2016-12-01 10:00:57 +00:00
- name : Update all packages
tags : step3
yum : name=* state=latest
2017-07-21 11:43:25 +01:00
update_tasks :
2017-07-24 14:01:06 +03:00
- name : Check for existing yum.pid
stat : path=/var/run/yum.pid
register : yum_pid_file
when : step == "0" or step == "3"
- name : Exit if existing yum process
fail : msg="ERROR existing yum.pid detected - can't continue! Please ensure there is no other package update process for the duration of the minor update worfklow. Exiting."
when : (step == "0" or step == "3") and yum_pid_file.stat.exists
2017-07-21 11:43:25 +01:00
- name : Update all packages
2017-07-24 14:01:06 +03:00
yum : name=* state=latest update_cache=yes # cache for tripleo/+bug/1703830
2017-07-21 11:43:25 +01:00
when : step == "3"