load variables as a simple var for upgrades
This is needed because the upgrade.sh script runs each task on it's own. Not as a natural play. extra vars (as defined automaticly via the openstack-ansible command) still take precidence. Change-Id: I86c95d3fb6f9d931093ff6622b25e814920940f6 Closes-Bug: 1624029
This commit is contained in:
parent
666495bf6e
commit
2ec74e9d8a
@ -1,15 +0,0 @@
|
||||
# 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.
|
||||
---
|
||||
osa_secrets_file_name: user_secrets.yml
|
@ -24,10 +24,11 @@
|
||||
register: secrets
|
||||
- name: Add missing secret
|
||||
shell: |
|
||||
if ! grep '^{{ item }}' /etc/openstack_deploy/{{ osa_secrets_file_name }}; then
|
||||
echo {{ item }} | tee -a /etc/openstack_deploy/{{ osa_secrets_file_name }}
|
||||
if ! grep '^{{ item }}' /etc/openstack_deploy/{{ _osa_secrets_file_name }}; then
|
||||
echo {{ item }} | tee -a /etc/openstack_deploy/{{ _osa_secrets_file_name }}
|
||||
fi
|
||||
with_items: secrets.stdout_lines
|
||||
- name: Generate new secrets
|
||||
shell: "{{ playbook_dir }}/../../../scripts/pw-token-gen.py --file /etc/openstack_deploy/{{ osa_secrets_file_name }}"
|
||||
|
||||
shell: "{{ playbook_dir }}/../../../scripts/pw-token-gen.py --file /etc/openstack_deploy/{{ _osa_secrets_file_name }}"
|
||||
vars:
|
||||
_osa_secrets_file_name: "{{ osa_secrets_file_name | default('user_secrets.yml') }}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user