Generic inventory and playbook
This patch introduces the capacity for the tripleo_entrypoint.sh script to generate an inventory and/or a playbook from env variables passed to the runner container by the operator itself The ansibleee-operator will take care of filling the contents of the env variables in [1] and [2] [1] https://github.com/openstack-k8s-operators/ansibleee-operator/pull/20 [2] https://github.com/openstack-k8s-operators/ansibleee-operator/pull/9 Change-Id: I030518bb8807aad9fb0d480a130d327522de707d
This commit is contained in:
parent
f0e7da7b0a
commit
7f8a19eb15
@ -4,4 +4,13 @@
|
||||
# Expand the variables
|
||||
eval "echo \"$(cat /runner/env/settings)\"" > /runner/env/settings
|
||||
|
||||
if [ -n "$RUNNER_INVENTORY" ]; then
|
||||
echo "---" > /runner/inventory/inventory.yaml
|
||||
echo "$RUNNER_INVENTORY" >> /runner/inventory/inventory.yaml
|
||||
fi
|
||||
|
||||
if [ -n "$RUNNER_PLAYBOOK" ]; then
|
||||
echo "---" > /runner/project/playbook.yaml
|
||||
echo "$RUNNER_PLAYBOOK" >> /runner/project/playbook.yaml
|
||||
|
||||
# Contents from ansible-runner entrypoint
|
||||
|
@ -12,6 +12,7 @@ tcib_actions:
|
||||
# to the tcib file so the subsequent image let the operator set temporary permissions
|
||||
# on the openshift uid for ansible to work.
|
||||
- run: chmod g=u /etc/passwd /etc/group
|
||||
- run: chmod -R 777 /usr/share/ansible
|
||||
- workdir: /usr/share/ansible/roles
|
||||
- run: >-
|
||||
if [ -f "$TRIPLEO_ANSIBLE_REQ" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user