Here’s the deal:
tower-cli job_template create --name "bljak" --inventory 16 --credential "awx_key" --project "goolamaloo" --playbook "pull.yml" --job-type run --verbosity default --diff-mode true
Inventory, machine credential, playbook and project are present in awx before running this command and are in the same organization.
Problem: The command goes through without a hitch, template is created with all given attributes, but the Credential field in GUI remains empty and the playbook breaks because no credential is specified.
It is still possible to add the same credential manually in the GUI and then the playbook works.
I still haven’t found any way to attach a machine credential to a template (new or existing) using tower-cli. Pls halp.
AWX 6.0.0.0
Ansible 2.8.1
Tower CLI 3.3.4