Add ability to change apt/yum package state globally
This patch adds the ability for a deployer to change the desired state for distribution packages globally through a single variable. Change-Id: Ibffe78f0d49a419259622d5080cfc763424bda4d
This commit is contained in:
parent
1a797e42ec
commit
abc1663ab3
@ -22,6 +22,16 @@ debug: False
|
||||
## SSH connection wait time
|
||||
ssh_delay: 5
|
||||
|
||||
# Set the package install state for distribution packages
|
||||
# Options are 'present' and 'latest'
|
||||
package_state: "latest"
|
||||
|
||||
# Ensure that the package state matches the global setting
|
||||
ceph_client_package_state: "{{ package_state }}"
|
||||
galera_client_package_state: "{{ package_state }}"
|
||||
pip_install_package_state: "{{ package_state }}"
|
||||
rsyslog_client_package_state: "{{ package_state }}"
|
||||
|
||||
# These are pinned to ensure exactly the same behaviour forever!
|
||||
# These pins are updated through the sources-branch-updater script
|
||||
pip_packages:
|
||||
|
@ -15,3 +15,6 @@
|
||||
|
||||
aodh_service_in_ldap: "{{ service_ldap_backend_enabled }}"
|
||||
aodh_service_publicuri: "{{ openstack_service_publicuri_proto|default(aodh_service_proto) }}://{{ external_lb_vip_address }}:{{ aodh_service_port }}"
|
||||
|
||||
# Ensure that the package state matches the global setting
|
||||
aodh_package_state: "{{ package_state }}"
|
||||
|
@ -20,3 +20,6 @@ ceilometer_service_in_ldap: "{{ service_ldap_backend_enabled }}"
|
||||
|
||||
ceilometer_aodh_enabled: groups['aodh_all'] is defined and groups['aodh_all'] | length > 0
|
||||
ceilometer_gnocchi_enabled: groups['gnocchi_all'] is defined and groups['gnocchi_all'] | length > 0
|
||||
|
||||
# Ensure that the package state matches the global setting
|
||||
ceilometer_package_state: "{{ package_state }}"
|
||||
|
@ -22,3 +22,6 @@ cinder_glance_api_version: "{{ (cinder_backends_rbd_inuse|bool and glance_defaul
|
||||
|
||||
# If there are any Ceilometer hosts in the environment, then enable its usage
|
||||
cinder_ceilometer_enabled: "{{ (groups['ceilometer_all'] is defined) and (groups['ceilometer_all'] | length > 0) }}"
|
||||
|
||||
# Ensure that the package state matches the global setting
|
||||
cinder_package_state: "{{ package_state }}"
|
||||
|
@ -14,3 +14,6 @@
|
||||
# limitations under the License.
|
||||
|
||||
galera_client_drop_config_file: true
|
||||
|
||||
# Ensure that the package state matches the global setting
|
||||
galera_server_package_state: "{{ package_state }}"
|
||||
|
@ -18,3 +18,6 @@ glance_service_in_ldap: "{{ service_ldap_backend_enabled }}"
|
||||
|
||||
# If there are any Ceilometer hosts in the environment, then enable its usage
|
||||
glance_ceilometer_enabled: "{{ (groups['ceilometer_all'] is defined) and (groups['ceilometer_all'] | length > 0) }}"
|
||||
|
||||
# Ensure that the package state matches the global setting
|
||||
glance_package_state: "{{ package_state }}"
|
||||
|
@ -20,3 +20,6 @@ gnocchi_service_internalurl: "{{ gnocchi_service_internaluri_proto }}://{{ inter
|
||||
|
||||
gnocchi_ssl_external: "{{ openstack_external_ssl }}"
|
||||
gnocchi_service_region: "{{ service_region }}"
|
||||
|
||||
# Ensure that the package state matches the global setting
|
||||
gnocchi_package_state: "{{ package_state }}"
|
||||
|
@ -15,3 +15,6 @@
|
||||
|
||||
haproxy_bind_on_non_local: "{% if groups.haproxy[1] is defined and internal_lb_vip_address != external_lb_vip_address %}True{% else %}False{% endif %}"
|
||||
haproxy_use_keepalived: "{% if groups.haproxy|length > 1 %}True{% else %}False{% endif %}"
|
||||
|
||||
# Ensure that the package state matches the global setting
|
||||
haproxy_package_state: "{{ package_state }}"
|
||||
|
@ -18,3 +18,6 @@ heat_service_in_ldap: "{{ service_ldap_backend_enabled }}"
|
||||
|
||||
# If there are any Ceilometer hosts in the environment, then enable its usage
|
||||
heat_ceilometer_enabled: "{{ (groups['ceilometer_all'] is defined) and (groups['ceilometer_all'] | length > 0) }}"
|
||||
|
||||
# Ensure that the package state matches the global setting
|
||||
heat_package_state: "{{ package_state }}"
|
||||
|
@ -26,3 +26,6 @@ horizon_enable_neutron_vpnaas: "{{ neutron_plugin_base is defined and 'vpnaas' i
|
||||
horizon_enable_ha_router: "{{ neutron_plugin_type.split('.')[0] == 'ml2' and (groups['neutron_l3_agent'] | length >= 2) }}"
|
||||
horizon_rabbitmq_userid: horizon
|
||||
horizon_rabbitmq_vhost: /horizon
|
||||
|
||||
# Ensure that the package state matches the global setting
|
||||
horizon_package_state: "{{ package_state }}"
|
||||
|
19
playbooks/inventory/group_vars/hosts.yml
Normal file
19
playbooks/inventory/group_vars/hosts.yml
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
# Copyright 2016, Rackspace US, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Ensure that the package state matches the global setting
|
||||
lxc_hosts_package_state: "{{ package_state }}"
|
||||
openstack_hosts_package_state: "{{ package_state }}"
|
||||
security_package_state: "{{ package_state }}"
|
@ -18,3 +18,6 @@ ironic_rabbitmq_userid: ironic
|
||||
ironic_galera_database: ironic
|
||||
ironic_galera_user: ironic
|
||||
ironic_service_adminurl: "{{ ironic_service_adminuri }}/v1"
|
||||
|
||||
# Ensure that the package state matches the global setting
|
||||
ironic_package_state: "{{ package_state }}"
|
||||
|
@ -21,3 +21,6 @@ keystone_service_in_ldap: "{{ service_ldap_backend_enabled }}"
|
||||
|
||||
# If there are any Ceilometer hosts in the environment, then enable its usage
|
||||
keystone_ceilometer_enabled: "{{ (groups['ceilometer_all'] is defined) and (groups['ceilometer_all'] | length > 0) }}"
|
||||
|
||||
# Ensure that the package state matches the global setting
|
||||
keystone_package_state: "{{ package_state }}"
|
||||
|
@ -22,3 +22,6 @@ magnum_rabbitmq_vhost: /magnum
|
||||
magnum_rabbitmq_port: "{{ rabbitmq_port }}"
|
||||
magnum_rabbitmq_servers: "{{ rabbitmq_servers }}"
|
||||
magnum_rabbitmq_use_ssl: "{{ rabbitmq_use_ssl }}"
|
||||
|
||||
# Ensure that the package state matches the global setting
|
||||
magnum_package_state: "{{ package_state }}"
|
||||
|
@ -14,3 +14,6 @@
|
||||
# limitations under the License.
|
||||
|
||||
memcached_listen: "{{ ansible_ssh_host }}"
|
||||
|
||||
# Ensure that the package state matches the global setting
|
||||
memcached_package_state: "{{ package_state }}"
|
||||
|
@ -28,3 +28,6 @@ neutron_rabbitmq_use_ssl: "{{ rabbitmq_use_ssl }}"
|
||||
|
||||
# If there are any Ceilometer hosts in the environment, then enable its usage
|
||||
neutron_ceilometer_enabled: "{{ (groups['ceilometer_all'] is defined) and (groups['ceilometer_all'] | length > 0) }}"
|
||||
|
||||
# Ensure that the package state matches the global setting
|
||||
neutron_package_state: "{{ package_state }}"
|
||||
|
@ -21,3 +21,6 @@ nova_glance_api_servers: "{{ glance_api_servers }}"
|
||||
|
||||
# If there are any Ceilometer hosts in the environment, then enable its usage
|
||||
nova_ceilometer_enabled: "{{ (groups['ceilometer_all'] is defined) and (groups['ceilometer_all'] | length > 0) }}"
|
||||
|
||||
# Ensure that the package state matches the global setting
|
||||
nova_package_state: "{{ package_state }}"
|
||||
|
@ -14,3 +14,6 @@
|
||||
# limitations under the License.
|
||||
|
||||
rabbitmq_cluster_name: openstack
|
||||
|
||||
# Ensure that the package state matches the global setting
|
||||
rabbitmq_package_state: "{{ package_state }}"
|
||||
|
18
playbooks/inventory/group_vars/repo_all.yml
Normal file
18
playbooks/inventory/group_vars/repo_all.yml
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
# Copyright 2016, Rackspace US, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Ensure that the package state matches the global setting
|
||||
repo_server_package_state: "{{ package_state }}"
|
||||
repo_build_package_state: "{{ package_state }}"
|
@ -14,3 +14,6 @@
|
||||
# limitations under the License.
|
||||
|
||||
rsyslog_server_storage_directory: /var/log/log-storage
|
||||
|
||||
# Ensure that the package state matches the global setting
|
||||
rsyslog_package_state: "{{ package_state }}"
|
||||
|
@ -18,3 +18,6 @@ swift_service_in_ldap: "{{ service_ldap_backend_enabled }}"
|
||||
|
||||
# If there are any Ceilometer hosts in the environment, then enable its usage
|
||||
swift_ceilometer_enabled: "{{ (groups['ceilometer_all'] is defined) and (groups['ceilometer_all'] | length > 0) }}"
|
||||
|
||||
# Ensure that the package state matches the global setting
|
||||
swift_package_state: "{{ package_state }}"
|
||||
|
@ -20,3 +20,6 @@ tempest_log_dir: /var/log/utility
|
||||
# utility_ssh_private_key: "{{ lookup('file', '/root/.ssh/id_rsa') }}"
|
||||
|
||||
galera_client_drop_config_file: true
|
||||
|
||||
# Ensure that the package state matches the global setting
|
||||
utility_package_state: "{{ package_state }}"
|
||||
|
12
releasenotes/notes/package-state-6f5ce66be8ddf119.yaml
Normal file
12
releasenotes/notes/package-state-6f5ce66be8ddf119.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
---
|
||||
features:
|
||||
- A new global option to control all package install states has been
|
||||
implemented. The default action for all distribution package
|
||||
installations is to ensure that the latest package is installed.
|
||||
This may be changed to only verify if the package is present by
|
||||
setting ``package_state`` to ``present``.
|
||||
upgrade:
|
||||
- All roles always checks whether the latest package is installed
|
||||
when executed. If a deployer wishes to change the check to
|
||||
only validate the presence of the package, the option
|
||||
``package_state`` should be set to ``present``.
|
Loading…
Reference in New Issue
Block a user