Questions tagged [ansible-tower]

Use for questions about programming issues related to the Ansible Tower REST API. Questions about using the Ansible Tower GUI for managing both cloud-based and traditional/hybrid Ansible deployments should be asked on ServerFault.com.

Ansible Tower (formerly ‘AWX’) is a web-based solution that makes Ansible even more easy to use for IT teams of all kinds. It’s designed to be the hub for all of your automation tasks.

Tower allows you to control access to who can access what, even allowing sharing of SSH credentials without someone being able to transfer those credentials. Inventory can be graphically managed or synced with a wide variety of cloud sources. It logs all of your jobs, integrates well with LDAP, and has an amazing browsable REST API. Command line tools are available for easy integration with Jenkins as well. Provisioning callbacks provide great support for autoscaling topologies.

Questions about using the Ansible Tower GUI for managing both cloud-based and traditional/hybrid Ansible deployments should be asked on ServerFault.com.

343 questions
1
vote
1 answer

How do you compare values in two Ansible lists?

I've got two lists in Ansible that I build on the fly using the find module - name: "Find all files in {{ backup_path }}" ansible.builtin.find: paths: - "{{ backup_path }}" get_checksum: true recurse: yes depth: 2 …
Stan
  • 1,191
  • 2
  • 15
  • 27
1
vote
1 answer

How to pass(use) google SA json in AWX to run anisble playbook which creates/updates/modify the VM in gcp?

I have an ansible-playbook, which will connect to GCP using SA and its JSON file. I have downloaded the JSONn file in my local and provided the path value to "credentials_file". this works if I run the playbook from my local machine. Now, I want to…
1
vote
1 answer

Interactive Input in AWX/ Ansible Tower

I have a requirement where I need to get the inputs from the user when the playbook is being executed. I used "pause" module and hence was able to get the input from the user during runtime of the playbook which went well on Ansible CLI. But, when…
1
vote
2 answers

Ansible playbook to check user exist or display error message

How to check if user is present and if present, continue with next task if not present display a message saying Given user does not exist
1
vote
1 answer

How to AWX launch Job ID of a Scheduled Job

When i schedule job in AWX i get schedule job id (for example - 343), After the job launched on scheduled time, i get new launch job id(for example - 34848) that is different from schedule job id. How to get job id of launch job based on schedule…
1
vote
0 answers

Not able to set credentails at ansible tower

I'm trying to create credentials at ansible tower but getting error should not be set when SSH key is not encrypted. Authentication method is via private key and passphrase .
1
vote
1 answer

Ansible tower API: pass inventory for a job in a POST payload

does anyone know if it is possible to pass an inventory (the actual list of servers) in a POST's payload when launching a job on Ansible tower via the API? Thanks Wojtek I could not find any reference about it in the documentation. The only option I…
wb84
  • 11
  • 2
1
vote
0 answers

Does AWX 17.0.1 support fetching collections from Github using requirements.yml

We are currently using AWX 17.0.1 with Ansible 2.9.17. Does this version of AWX support installing collections directory from a Git repository for example from GitHub? Using requirements.yml file? For example I can get collection community.mysql…
onknows
  • 6,151
  • 12
  • 65
  • 109
1
vote
1 answer

custom job status for awx/ansible tower workflows

AWX/Ansible Tower has it's own REST API service. From the below url structure i can get information about an in progress or finished workflow job: https:///api/v2/workflow_jobs// But the "status" field at this url doesn't show the…
Jai
  • 167
  • 1
  • 10
1
vote
0 answers

Ansible Tower unable to login to Windows host with winrm/credssp

Ansible Tower is currently giving me the following output when I try to run the win_ping module against a test windows server: SSH password: *server fqdn* | UNREACHABLE! => { "changed": false, "msg": "credssp: Server did not response with a…
ITMike89
  • 57
  • 7
1
vote
2 answers

What would be the best approach to emulate "templates hierarchy"?

Ansible Tower does not offer directory hierarchy for templates and workflows. How should we manage their growing number in a flat structure? I know we could use labels, but their use seems a bit tedious and assume that users already knows label…
Zee
  • 13
  • 2
1
vote
1 answer

Ansible uri module "urlopen error [Errno -2] Name or service not known"

I would like to make API request to internet using Ansible Tower and a playbook but I have an error. In this example, I try to request https://www.google.com, but the result is the same with others websites. Here you can see my playbook : --- -…
Arthur
  • 11
  • 1
  • 4
1
vote
2 answers

How to pass variable data through Ansible Tower API to a playbook template

We use Ansible Tower for Operations to perform process restarts. If they receive an alert says a process stopped, they execute an Ansible Tower job and supply the host name and process name from the alert as "survey" variables. [A lot more happens,…
Steve J
  • 313
  • 1
  • 2
  • 8
1
vote
1 answer

How to find the ansible tower job status for the particular job id using REST API

I am creating a job template in Ansible Tower and then launching it using REST API. Now I need to check the status(PENDING, RUNNING, FAILED, SUCCESSFUL, CANCELLED) of the current running job in Ansible Tower with the job id. I was trying to run the…
vivek
  • 11
  • 1
  • 4
1
vote
0 answers

awx-manage is not working correctly when i try to remove an instance

i am using the command awx-manage (version 12.0.0, awx version 12.0.0) to add and remove instances automatically in the first case (adding an instance) the command works just fine: awx-manage register_queue --queuename=MY_INCTANCE_GROUP…
Abderrahmane
  • 385
  • 2
  • 3
  • 14