Node credential not exported in workflow with AWX CLI

32 views
Skip to first unread message

Ronan

unread,
Nov 3, 2021, 6:14:47 AM11/3/21
to AWX Project
Hi all,

I have a CD workflow that export objects from one AWX (19.3.0) instance to another.
I've notice that one property is not present when exporting a workflow with AWX CLI.

For example I have a simple workflow:
Screenshot 2021-11-03 110454.png
The service_adduser is decribed as folow:
Screenshot 2021-11-03 110537.png
Notice the credential that is associated: SSH Cloudmgr.
Now, when I export the object with awx-cli , that credential is not present:
{
     "workflow_job_templates": [
          {
               "name": "workflow_test",
               "description": "",
               "extra_vars": "---",
               "organization": null,
               "survey_enabled": false,
               "allow_simultaneous": false,
               "ask_variables_on_launch": false,
               "inventory": null,
               "limit": "",
               "scm_branch": "",
               "ask_inventory_on_launch": false,
               "ask_scm_branch_on_launch": false,
               "ask_limit_on_launch": false,
               "webhook_credential": null,
               "related": {
                    "schedules": [],
                    "workflow_nodes": [
                         {
                              "extra_data": {
                                   "vm_user_new": "user"
                              },
                              "scm_branch": null,
                              "job_type": null,
                              "job_tags": null,
                              "skip_tags": null,
                              "limit": null,
                              "diff_mode": null,
                              "verbosity": null,
                              "all_parents_must_converge": false,
                              "identifier": "5971f334-f610-4449-9a25-a06177cb7ec2",
                              "workflow_job_template": {
                                   "organization": null,
                                   "name": "workflow_test",
                                   "type": "workflow_job_template"
                              },
                              "related": {
                                   "credentials": [],
                                   "success_nodes": [],
                                   "failure_nodes": [],
                                   "always_nodes": []
                              },
                              "natural_key": {
                                   "workflow_job_template": {
                                        "organization": null,
                                        "name": "workflow_test",
                                        "type": "workflow_job_template"
                                   },
                                   "identifier": "5971f334-f610-4449-9a25-a06177cb7ec2",
                                   "type": "workflow_job_template_node"
                              }
                         }
                    ],
                    "labels": [],
                    "notification_templates_started": [],
                    "notification_templates_success": [],
                    "notification_templates_error": [],
                    "notification_templates_approvals": [],
                    "survey_spec": {}
               },
               "natural_key": {
                    "organization": null,
                    "name": "workflow_test",
                    "type": "workflow_job_template"
               }
          }
     ]
}

When I reimport that workflow, it's the default credential of the job template that is used, which is not the desired result.
Am I missing something ?

Ronan

unread,
Nov 12, 2021, 12:34:12 PM11/12/21
to AWX Project
Answering my onw question.
Credentials are indeed exported in workflow since awxcli. Thing is, the user used to do export must have sufficient privilege on that credential otherwise that property is silently discarded and not included in the export.
Reply all
Reply to author
Forward
0 new messages