Change flat network name for nosdn fdio scenario
[apex-tripleo-heat-templates.git] / puppet / services / tripleo-packages.yaml
1 heat_template_version: pike
2
3 description: >
4   TripleO Package installation settings
5
6 parameters:
7   ServiceData:
8     default: {}
9     description: Dictionary packing service data
10     type: json
11   ServiceNetMap:
12     default: {}
13     description: Mapping of service_name -> network name. Typically set
14                  via parameter_defaults in the resource registry.  This
15                  mapping overrides those in ServiceNetMapDefaults.
16     type: json
17   DefaultPasswords:
18     default: {}
19     type: json
20   RoleName:
21     default: ''
22     description: Role name on which the service is applied
23     type: string
24   RoleParameters:
25     default: {}
26     description: Parameters specific to the role
27     type: json
28   EndpointMap:
29     default: {}
30     description: Mapping of service endpoint -> protocol. Typically set
31                  via parameter_defaults in the resource registry.
32     type: json
33   EnablePackageInstall:
34     default: 'false'
35     description: Set to true to enable package installation at deploy time
36     type: boolean
37
38 outputs:
39   role_data:
40     description: Role data for the TripleO package settings
41     value:
42       service_name: tripleo_packages
43       config_settings:
44         tripleo::packages::enable_install: {get_param: EnablePackageInstall}
45       step_config: |
46         include ::tripleo::packages
47       upgrade_tasks:
48         - name: Check yum for rpm-python present
49           tags: step0
50           yum: "name=rpm-python state=present"
51           register: rpm_python_check
52         - name: Fail when rpm-python wasn't present
53           fail: msg="rpm-python package was not present before this run! Check environment before re-running"
54           when: rpm_python_check.changed != false
55           tags: step0
56         - block:
57             - name: Upgrade os-net-config
58               yum: name=os-net-config state=latest
59             - name: take new os-net-config parameters into account now
60               command: os-net-config --no-activate -c /etc/os-net-config/config.json -v --detailed-exit-codes
61               register: os_net_config_upgrade
62               failed_when: os_net_config_upgrade.rc not in [0,2]
63               changed_when: os_net_config_upgrade.rc == 2
64           tags: step3
65         - name: Update all packages
66           tags: step3
67           yum: name=* state=latest
68       update_tasks:
69         - name: Check for existing yum.pid
70           stat:  path=/var/run/yum.pid
71           register: yum_pid_file
72           when: step == "0" or step == "3"
73         - name: Exit if existing yum process
74           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."
75           when: (step == "0" or step == "3") and yum_pid_file.stat.exists
76         - name: Update all packages
77           yum: name=* state=latest update_cache=yes  # cache for tripleo/+bug/1703830
78           when: step == "3"