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
2 answers

Ansible Tower - set_stats does not seem to work

Looking for some guidance: I have a 3 step workflow - the first 2 templates use set_stats to set some fact data. eg: - set_stats: data: xldeploy_workstation_host : "{{ hostvars['localhost']['targethost'] }}" when: tower_job_id is…
kirk
  • 19
  • 1
  • 3
1
vote
2 answers

Launching and Monitoring a job at the same time in Ansible tower CLI

We have installed Ansible Tower and have the CLI tools implemented. We can launch jobs in the CLI using the following - tower-cli job launch -J 5 This returns the output like so - Resource changed. === ============ ========================…
J. Doe
  • 1,479
  • 5
  • 25
  • 49
1
vote
1 answer

Ansible Tower is not registering variable correctly in ec2-remote-facts module

The ec2-remote-facts module works correctly when I do not run it on Ansible Tower. The first example below (not using Tower) includes all of the block_device_mapping information that I use in subsequent tasks. This is a big issue I were to use…
0
votes
0 answers

How can I refer to an Ansible variable in log4j2.xml file

My goal is to define the directory path where the log files will be placed. This configuration should be done inside log4j2.xml file. The value of this path could be set via an Ansible variable (if set in Ansible tower template's extra variables),…
B.J
  • 267
  • 1
  • 2
  • 7
0
votes
0 answers

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

Please tell me how to specify the inventory name instead of id when running the template via Tower API? Work: curl -k -X POST -H "Content-Type: application/json" -H "Authorization: Bearer aDFNLAKJDFLKXZDnbmz" -d…
qoqo
  • 1
  • 1
0
votes
0 answers

Trouble with AWX Notification Templates: Customizations not working as expected

I've been encountering issues with AWX notification templates and their customizations. The problem I'm facing is that the notification templates don't seem to be functioning as they should. I've followed the documentation provided on the Ansible…
Bodruch
  • 25
  • 4
0
votes
0 answers

Ansible - AWX Could not replace a file

I have a playbook that gathers facts, and then stores the facts in a variable. I then copy the contents of that variable to a file on a delegated node. If I run this playbook natively, it works perfectly. However if I run this in AWX is fails with a…
0
votes
0 answers

How do I programmatically upload a credential to Ansible Tower with Microsoft Azure key Vault as the credential type

I am writing a python script to interact with Ansible Tower to upload credentials. I had no trouble doing this programmatically when the credential type was 'machine', however, I run in to trouble when I try to update my code to reference a secret…
0
votes
0 answers

Ansible - Install Client Oracle stops

Hy, When I run this command on my target server it works perfectly : /home/logiciel/oracle/v19c/client/runInstaller -showProgress -silent -responseFile /home/logiciel/oracle/v19c/client/response/client_install.rsp During the installation, it…
Ryad
  • 1
  • 1
0
votes
1 answer

UnicodeEncodeError: 'utf-8' codec can't encode character

When running below command from ansible tower i'm hitting UnicodeEncodeError utf-8 Command: pip3 install -r /requirements.txt --no-index --find-links / Error as below: "stderr_lines": "WARNING: Running pip install with root privileges is…
Bharath
  • 1
  • 1
0
votes
0 answers

Can't add credential for AWX job template when using tower api

I need to add existing ssh-key credential to the job template. But there is no parameter in tower api for create credential. reference…
0
votes
1 answer

Ansible Tower - How to get Credentials of type 'Github Personal Access Token' into a playbook?

I have my GitHub Personal Access Token (PAT) stored as a credential in Ansible Tower. How can I reference this value in my playbook? I've searched for examples for other Credential Types like "How to use Ansible Tower login credentials in…
vishal
  • 1,646
  • 5
  • 28
  • 56
0
votes
0 answers

Using Ansible Tower api to get teams associated with a job template

The tower api spec has an endpoint(job_templates/{id}/access_list) that list the users that have access to the template. Is there some way to get the list of teams that have access to this template?
Lincoln D
  • 351
  • 4
  • 7
0
votes
0 answers

Authentication to awx /websocket

I have trouble authenticating to awx websocket from my javascript app. The documentation says: "You can connect to the AWX channels implementation using any standard websocket library by pointing it to /websocket. You must provide a valid Auth Token…
Jan Kreps
  • 11
  • 3
0
votes
0 answers

How to launch templates in AWX using its REST API through Python?

I am trying to execute launch_template API through Python and send extra_vars as JSON payload as per API documentation. But extra_vars are not working and template execution gets failed. def execPlaybookAWX(): AWX_API =…