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
12
votes
3 answers

Ansible: playbook calling Role in a directory that is in the roles directory

I would like to shape my directory structure of my ansible roles and playbooks. Currently I have a directory structure like. group_vars * all * group-one - group-vars.yml - group-vault.yml ... host_vars -…
Eddie
  • 1,081
  • 2
  • 12
  • 28
8
votes
1 answer

Ansible Tower (AWX) - using secure variables in a playbook?

Greeting everyone, I've recently started messing with Ansible (in particular Ansible Tower). I ran into an issue using secure values in my playbook, more accurate, I didn't understand how to use it correctly. Compared to Chef-Infra, you could use…
Yehonatan G
  • 85
  • 1
  • 1
  • 7
7
votes
2 answers

How to trigger an Ansible Tower Job template from Github branch commit?

How can I trigger a job in Ansible Tower using its API on a Github branch commit? I could use a Github webhook but when triggered by a push it occurs regardless of branch. I'm wondering if the webhook payload could provide info but I m not sure how…
Carson Cole
  • 4,183
  • 6
  • 25
  • 35
5
votes
2 answers

Tower: What is causing "[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details"

I am just starting to work with Ansible Tower and made a project and then a job template under that project that uses a small initial test playbook (Test.yml): --- - hosts: east01.xxxxx.com become: yes become_method: sudo tasks: - name:…
user555303
  • 1,146
  • 3
  • 20
  • 44
5
votes
1 answer

How to respond to a Yes / No command prompt via Ansible?

I'm running a : - command: vsx update-software ... command to perform an update on a host, the command requests to enter "y" to go ahead with its exection. Will the command be executed with "yes" by default or should I add an Ansdible directive to…
Doc
  • 133
  • 1
  • 1
  • 10
5
votes
1 answer

Ansible Tower: How to pass job number into playbook?

I have written an Ansible playbook that needs as one of its parameters the job number that is running it so that I make add a reference to the job to a database that I maintain. How can I get the Tower template to pass this to the playbook? Here is…
user11466558
  • 127
  • 3
  • 10
5
votes
1 answer

Custom credentials in Ansible Tower with Custom Python Script

I'm trying to implement a custom script in Ansible Tower to dynamically import an inventory. The custom script is basically written using Python and is interacting with a Windows 2012 Server which is acting as a domain controller (DC). When the…
hypersonics
  • 1,064
  • 2
  • 10
  • 23
5
votes
3 answers

Ansible Tower REST API: Is there any way to get the logs/output of a job?

I have a Ansible job started by another Process. Now I need to check the status of the current running job in Ansible Tower. I am able to track the status whether it is running/success/failed/canceled with /jobs/{id} using REST API. But I would also…
Jeevitha G
  • 1,194
  • 3
  • 13
  • 20
4
votes
1 answer

Skip fail module when host is unreachable

I am trying to print a custom message, when certain host is unreachable. My problem is, when the host is unreachable, it will be skipped on the next task, thus the fail module will never be triggered. And the host that is reachable, will also skip…
sloweriang
  • 308
  • 4
  • 19
4
votes
1 answer

Extract value from output and send to next task

I am trying to define a template in Ansible Tower, where I want to extract the id for the Active Controller in Kafka Broker and then use this value in another template / task that will perform the rolling restart but will make sure the active…
adbdkb
  • 1,897
  • 6
  • 37
  • 66
4
votes
2 answers

Ansible Tower workflow pause execution

Is there a way in Ansible tower to pause the workflow template execution and wait for the user to provide some kind of input like "approved" or "reject" after completion of a job template and then proceed with the next job template? I am trying to…
Anshul
  • 75
  • 9
4
votes
1 answer

Setting vault password in Ansible Tower

I have used Ansible Vault to encrypt a file in which I have stored sensitive data. In my orchestration script below command is mentioned to run the playbook. ansible-playbook -i hosts -vvv Playbook.yml --ask-vault-pass This prompts user to provide…
Sudhir
  • 491
  • 1
  • 7
  • 21
4
votes
1 answer

Ansible Tower can't find my roles

I have my directory structure setup such that the playbooks directory is under /var/lib/awx/projects/ and roles is a symlink under playbooks. I need symlinks for roles as I'm using git push from my local system to push playbooks/roles to Tower and…
user3088128
  • 61
  • 1
  • 2
3
votes
1 answer

How can I send Ansible Tower workflow template approval to Slack channel and recieve response from Slack channel?

I have a situation where the approval logic in Ansible Tower workflow template is working fine, Slack notifications are also working fine, but, I want to send approve and deny buttons to Slack and capture response from Slack channel to Ansible Tower…
KrishnaR
  • 344
  • 4
  • 14
3
votes
1 answer

AWS Dynamic Inventory doesn't pull duplicate hostnames

I'm using Ansible inventory yaml file to get the list of running hosts but I get only unique named hosts. As you can see in AWS EC2 I have three servers named GamingServers, but I get only one of the hosts. When AWX Tower runs the Ansible inventory…
1
2 3
22 23