Merge "Make the release file options more configurable"

This commit is contained in:
Jenkins 2016-12-07 17:59:54 +00:00 committed by Gerrit Code Review
commit c0493b5078
4 changed files with 38 additions and 7 deletions

View File

@ -13,8 +13,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
openstack_code_name: Ocata
openstack_release: master
# /etc/openstack-release settings
openstack_distrib_id: "OSA"
openstack_distrib_release: "{{ openstack_release | default('master') }}"
openstack_distrib_code_name: "Ocata"
openstack_distrib_description: "OpenStack-Ansible"
openstack_distrib_file: yes
openstack_distrib_file_path: "/etc/openstack-release"
openstack_host_sysstat_enabled: true
openstack_host_sysstat_interval: 1

View File

@ -0,0 +1,19 @@
---
features:
- The copy of the ``/etc/openstack-release`` file is now optional.
To disable the copy of the file, set ``openstack_distrib_file``
to ``no``.
- The location of the ``/etc/openstack-release`` file placement
can now be changed. Set the variable ``openstack_distrib_file_path``
to place it in a different path.
upgrade:
- |
The variables used to produce the ``/etc/openstack-release`` file
have been changed in order to improve consistency in the name
spacing according to their purpose.
``openstack_code_name`` --> ``openstack_distrib_code_name``
``openstack_release`` --> ``openstack_distrib_release``
Note that the value for ``openstack_distrib_release`` will
be taken from the variable ``openstack_release`` if it is set.

View File

@ -16,6 +16,13 @@
- name: Drop openstack release file
template:
src: "openstack-release.j2"
dest: "/etc/openstack-release"
dest: "{{ openstack_distrib_file_path }}"
owner: "root"
group: "root"
when: openstack_distrib_file | bool
- name: Remove legacy openstack release file
file:
path: "{{ openstack_distrib_file_path }}"
state: absent
when: not openstack_distrib_file | bool

View File

@ -1,6 +1,6 @@
# {{ ansible_managed }}
DISTRIB_ID="OSA"
DISTRIB_RELEASE="{{ openstack_release }}"
DISTRIB_CODENAME="{{ openstack_code_name }}"
DISTRIB_DESCRIPTION="OpenStack-Ansible"
DISTRIB_ID="{{ openstack_distrib_id }}"
DISTRIB_RELEASE="{{ openstack_distrib_release }}"
DISTRIB_CODENAME="{{ openstack_distrib_code_name }}"
DISTRIB_DESCRIPTION="{{ openstack_distrib_description }}"