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

Ansible Tower can we pass hostname as variable to job template

For Ansible Tower can we pass hostname as variable to job template , so that when the Job template is Run we can pass the host details dynamically during runtime and playbook would run on this host. Basiacally this variable should then update the…
alok tanna
  • 71
  • 6
1
vote
1 answer

What is the difference between Ansible Inventory Plugins and inventory scripts

Most of the tutorials that I found online discuss using scripts for Dynamic inventories. Ansible recommends using plugins for Dynamic inventories, but even in Ansible Tower, there is the option to create Inventory Scripts but nothing on plugins.
Doc
  • 133
  • 1
  • 1
  • 10
1
vote
1 answer

Where to store custom module unit test in a project used by Ansible Tower?

I finished coding three Ansible custom module that are stored in a Git Repository that is used by a Ansible Tower Project. The directory tree looks like that : > files/ > - a.txt > - b.txt > library/ > - common_code.py > module_utils/ > -…
Thronghar
  • 457
  • 2
  • 10
1
vote
0 answers

How to use aruba_command with expect directive?

commands: - expect: command: "vsx update-software ....." responses: 'The.....(y/n)?': 'y' 'Do.....(y/n)?': 'y' I'm trying to run this on a Playbook, I'm…
Doc
  • 133
  • 1
  • 1
  • 10
1
vote
1 answer

Ansible Tower variable for SCM commit ID/SHA

I'm using a source controlled project in Ansible Tower that plugs into github/azure devops. I'm looking for (but can't find) a variable that represents the commit ID/SHA hash of the playbook.yml im running, so I can log it to a built VM im building…
Medos
  • 305
  • 1
  • 3
  • 9
1
vote
1 answer

How can I limit the hosts in a Template on AWX?

The hosts which I address in the Playbook maint-change.yml belong to two Groups (instancegroup1 & instancegroup2 with sveral hosts in each group) like this: - hosts: "{{ server | default('instancegroup1 instancegroup2') }}" So if I just want to…
margot
  • 13
  • 1
  • 4
1
vote
1 answer

Is there a more elegant way to access Job Number during runtime?

I am trying to access the job number in order to send a link to the jobs tower logs via email. It must have access within the playbook and be available at runtime. This has proven to be extremely difficult as ansible tower does not have this…
1
vote
1 answer

Using ping on localhost in a playbook

I am unable to run ping commands from a ansible host (using localhost, see below). I built a simple playbook to run ping using the command module: --- # - name: GET INFO hosts: localhost tasks: - name: return motd to registered var …
rev_it_up
  • 75
  • 2
  • 11
1
vote
1 answer

Ansible AWX - get project url and user

I'm in the process of migrating Ansible playbooks into Ansible AWX projects. Previously I'd checkout the Ansible playbook from git, then run it from the command line. In this specific case I have a Ansible Playbook that creates VMware virtual…
Magick
  • 4,603
  • 22
  • 66
  • 103
1
vote
1 answer

Ansible vmware_guest optional disk with Ansible Tower survey

I have a playbook for the creation of a VM from a template in VMware ESXi 6.7. My playbook is below. I want to only configure the second (and possible subsequent) disks if the DISK1_SIZE_GB variable is > 0. This is not working. I've also tried using…
eliszka
  • 13
  • 2
1
vote
2 answers

Upgrade Ansible Tower - Minor upgrade

Anyone got a proper instruction set to upgrade Ansible Tower 3.4 to 3.6 ? (Ansible 2.5, Database - postgres 9.6) Found Ansible Doc but not in details. Thanks
Gineesh
  • 429
  • 1
  • 5
  • 13
1
vote
0 answers

Ansible Tower Trial version is not working with license

is Ansible Tower Trial version is available to download? I tried many way to get a trial version of Ansible Tower and i didnt get any response or license from Redhat, even i tried with my organization mail id. After installation, login screen i…
vyshakh
  • 143
  • 3
  • 11
1
vote
0 answers

Python Libs conflicts while installing Ansible Tower 3.4.2

Getting below error while installing Ansible tower, any idea how this can be resolved? Please help. fatal: [localhost]: FAILED! => {"changed": true, "msg": "Error: Package: ansible-tower-server-3.4.2-1.el7.x86_64 (ansible-tower)\n …
1
vote
3 answers

Ansible Tower - Module lineinfile - Issue: Missing lines

I'm using ansible tower and configured to run forks = 250. My tasks is simple, it writes in a file data extracted from hosts like 4000 hosts. example: - name: creating report lineinfile: dest="reports/{{ report_name }}.csv" line="{{…
eduprado
  • 81
  • 1
  • 4
1
vote
1 answer

Search for value in variables in AWX

I am trying to come up with a host filter query in awx that is able to filter for a value in a key contained in the variables field of my inventory. My variable field looks something like this: { "variables": "{..., \"labels\": {\"automation\":…
stiller_leser
  • 1,512
  • 1
  • 16
  • 39