How to access AWX credential store from a Playbook?

Hi there!

Is possible to access the credentials stored in AWX from a Playbook?
How?

For environment variable and ini-based credentials yes. In general, though, especially for machine credentials… we try to protect those from leaking in any way.

In my case im interested in Machine Credentials.
Specifically, how to update them from a Playbook.

There’s no way to read those values out of the api but you can update them.

ok…
So delete and create or is there an edit option?
URI module is the best option?

Claudio,

I’d suggest tower-cli (a command-line tool for interacting with the tower api), or Ansible core Tower modules. If you must, use the URI module. Edit is available via the PATCH operator. The API is self-browsing, try it out by going to http://your_tower_host/api/v2/

One more question.

Whats the best way (on AWX) to use credentials on a Playbook?

Basically i’m currently working on automation to deploy some Plesk VMs.
All VMs get deployed with the same default root password, and i want to change this password for a new one (all vms with the same root password),
Then, AWX install Plesk panel. I need to setup the admin credentials (Basically the password). I’m also triying to set the same admin password for all VMs.
Also, what i want to achieve is to rotate root and admin passwords monthly.

So. Whats the recommended approach to achieve this?
Should i consider using something else instead of AWX Credentials?