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

How to add host to group in Ansible Tower inventory?

How can I add a host to a group using tower_group or tower_host modules? The following code creates a host and a group, but they are unrelated to each other: --- - hosts: localhost connection: local gather_facts: false tasks: -…
Jan Cichy
  • 21
  • 1
  • 4
2
votes
1 answer

Ansible AWX RabbitMQ container in Kubernetes Failed to get nodes from k8s with nxdomain

I am trying to get Ansible AWX installed on my Kubernetes cluster but the RabbitMQ container is throwing "Failed to get nodes from k8s" error. Below are the version of platforms I am using [node1 ~]# kubectl version Client Version:…
kaylor
  • 23
  • 3
2
votes
3 answers

Ansible Tower/AWX: Location of job results in PostgreSQL

I'm trying to get STDOUT and STDERR of a specific task from the PostgreSQL database to use it in a commit comment. I have difficulty with finding the right table. Has anyone tried to get a specific task results, STDOUT and STDERR from Ansible…
MMT
  • 1,931
  • 3
  • 19
  • 35
2
votes
1 answer

What's the syntax for using facts in Ansible Tower?

I'm using Ansible Tower trying to create a Smart Inventory based on some Ansible Facts. What's the syntax required to access the "facts" in a Smart Inventory?
technocrat
  • 3,513
  • 5
  • 25
  • 39
2
votes
1 answer

How to make the Name column in Ansible Tower longer?

When viewing the Name column in 'Jobs' and 'Job Template' on Ansible I am not able to see the full name of some of my services. Is there a way to customize the size of each field of remove ones I don't need to see?
Tony Stark
  • 21
  • 2
2
votes
2 answers

Creating an Inventory Source using Ansible Tower REST API

I am trying to use the Ansible Tower REST API to configure a Tower instance to pull the inventory from EC2. However, the REST API only has documented the ways to GET the Inventory Source, and I can't seem to find a way to create one. Is this…
Derek Brown
  • 4,232
  • 4
  • 27
  • 44
1
vote
1 answer

Powershell Mapping to network drive via Ansible

I currently have a powershell script (deploy.ps1) which I use to manage files on a network drive. When running my script, I am successfully able to map to the drive and access the contents. However, when attempting to do this by via an Ansible…
1
vote
0 answers

Undefined variable error when attempting to create custom credential type

Package: awx.awx Module: credential_type I am attempting to generate custom AWX credential types using the awx.awx.credential_type. According to the documentation, this should just work. However, I keep getting the error "undefined variable" (exact…
Sagar
  • 9,456
  • 6
  • 54
  • 96
1
vote
2 answers

Ansible Tower pass parameter to powershell script

I am trying to pass ansible variables to my powershell script as parameters. While they are successfully being passed, the path of my file is being cut short. For example, when passing a string '/Microsoft SQL Server/files/blah', and printing it in…
1
vote
1 answer

Ansible : Select inventory file out of multiple hosts.ini for three environments based on the version passed as a variable

I have a task , in which I need to select the target environment/hosts amongst the multiple inventory files placed in different folders under inventories/ directory. The selection is based on the version passed as a variable. inventories/ …
1
vote
1 answer

Issue with AWX not with command line

I have a role in ansible working in command line but not through awx. Here the role : - name: Enable persistent logging ansible.builtin.lineinfile: path: /etc/systemd/journald.conf regexp: '^#Storage' line: Storage=persistent - name:…
Lud
  • 45
  • 7
1
vote
1 answer

How can I check if a playbook is being used by any job template?

We have an organization with several hundred job templates. I essentially want to do some housekeeping and identify any unused playbooks in my repository. Is there a way to get details about each job template (including playbook) so that I can grep…
Mint
  • 1,013
  • 1
  • 12
  • 29
1
vote
1 answer

Ansible AWX: Behavior of Job Slicing

I am running task against 3 servers and I have set job slicing option as 3. After execution is completed I see below behavior Job 1 : task executed for host-A Job 2 - task executed for host-B and host-C Job 3 - no hosts matched. My understanding is…
Sam
  • 97
  • 1
  • 10
1
vote
0 answers

Ansible AWX: LDAP mapping for organization, teams, project

I am setting up LDAP settings in Ansible AWX. I want to achieve 3 things in ldap settings for organization, teams and projects : All XYZ team members should be super admin (DONE) Organization permission should be group level (not user level) All…
1
vote
1 answer

Multiple choice variable to specify folder rights in Ansible Tower

I have a playbook that creates a directory in Ansible Tower. I have a survey with a multiple choice options to choose the permission for this folder. The playbook is: - name: Create a directory hosts: localhost become_user: root tasks: -…
raquel666
  • 15
  • 3