Skip to content

Commit b003057

Browse files
committed
project_create: trigger storage_on_create_project
Successful execution of this playbook is a pre-requisite for creating SVM representation in Nautobot
1 parent 8f7f1d2 commit b003057

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

workflows/openstack/sensors/sensor-keystone-oslo-event.yaml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,28 @@ spec:
9595
project_id_without_dashes = "{{workflow.parameters.project_id}}"
9696
print(str(uuid.UUID(project_id_without_dashes)))
9797
98-
- - name: ansible-to-nautobot
98+
- - name: ansible-create-project
99+
when: "{{steps.oslo-events.outputs.parameters.svm_enabled}} == True"
100+
inline:
101+
container:
102+
image: ghcr.io/rss-engineering/undercloud-nautobot/ansible:latest
103+
command: [ansible-playbook]
104+
args:
105+
- "storage_on_create_project.yml"
106+
- --extra-vars
107+
- "project_id={{steps.convert-project-id.outputs.result}} env=dev"
108+
- "-i"
109+
- "inventory/uc-dev/01-nautobot.yaml"
110+
- "-vvv"
111+
# TODO: this shouldn't be hardcodod to dev, but will work since
112+
# it really talks to https://nautobot-default.svc
113+
env:
114+
- name: NAUTOBOT_TOKEN
115+
valueFrom:
116+
secretKeyRef:
117+
key: token
118+
name: nautobot-token
119+
- - name: ansible-create-svm
99120
when: "{{steps.oslo-events.outputs.parameters.svm_created}} == True"
100121
inline:
101122
container:

0 commit comments

Comments
 (0)