diff --git a/argo-workflows/sync-nb-server-to-ironic/workflowtemplates/sync-server-to-ironic.yaml b/argo-workflows/sync-nb-server-to-ironic/workflowtemplates/sync-server-to-ironic.yaml index 0b8fa4ee3..737651a41 100644 --- a/argo-workflows/sync-nb-server-to-ironic/workflowtemplates/sync-server-to-ironic.yaml +++ b/argo-workflows/sync-nb-server-to-ironic/workflowtemplates/sync-server-to-ironic.yaml @@ -12,17 +12,16 @@ spec: value: "{}" templates: - name: main - input: - parameters: - - name: interface_update_event - output: - parameters: - - name: server_state - valueFrom: - expression: "{{ steps.sync-server.outputs.parameters.result }}" steps: - - name: sync-server - container: + input: + parameters: + - name: interface_update_event + output: + parameters: + - name: server_state + value: "{{ steps.sync-server.outputs.parameters.result.server_state }}" + container: image: ghcr.io/rackerlabs/understack/ironic-nautobot-client:latest command: - sync-server @@ -32,7 +31,7 @@ spec: - mountPath: /etc/ironic-secrets/ name: ironic-secrets readOnly: true - volumes: - - name: ironic-secrets - secret: + volumes: + - name: ironic-secrets + secret: secretName: production-ironic-for-argo-creds diff --git a/python/understack-workflows/understack_workflows/main/sync_server.py b/python/understack-workflows/understack_workflows/main/sync_server.py index 53156b247..eef6538f1 100644 --- a/python/understack-workflows/understack_workflows/main/sync_server.py +++ b/python/understack-workflows/understack_workflows/main/sync_server.py @@ -48,7 +48,7 @@ def main(): f"Device {node.uuid} is in a {ironic_node.provision_state} " f"provision_state, so the updates are not allowed." ) - return ironic_node.provision_state + sys.exit(0) drac_ip = update_data["ip_addresses"][0]["host"] expected_address = f"https://{drac_ip}" @@ -81,4 +81,4 @@ def main(): if __name__ == "__main__": - main() + sys.stdout.write(main())