Questions tagged [ansible-awx]

Ansible Tower is a GUI and REST API for managing both cloud-based and traditional/hybrid Ansible deployments

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is the upstream project for Red Hat Ansible Tower, a commercial derivative of AWX.

Home Page: https://github.com/ansible/awx

424 questions
-1
votes
1 answer

How to enable or disable multiple hosts in Ansible Tower/AWX to include or exclude while running jobs?

Is there any way to enable or disable multiple hosts in an inventory to include or exclude them while running jobs? I know we can disable one host at a time via the Inventories web UI, but this is very time consuming. I was looking for something…
-1
votes
1 answer

Print output of the items in a with_lines loop

In the below playbook, I need to print the output of all the stdout_lines executed from the text file. I need to validate for some string existence in the stdout_lines. --- - hosts: '{{ host }}' gather_facts: true become: true vars: …
-1
votes
1 answer

Is there a way to set AWX Tower's: Azure AD OAuth2 Callback URL or Azure AD OAuth2 Key via an API call?

Just wondering if there is any way I have not seen yet that is able to set Azure AD OAuth2 Key or Azure AD OAuth2 Callback URL via any type of API?
-1
votes
2 answers

Job Templates AWX

I have a playbook like this, I tried to run it in ansible awx as job template but got an Traceback (most recent call last):\n File \"/root/.ansible/tmp/ansible-tmp-1609214869.41401-6813-56941014390086/rhv-snapshots.py\", line 4, in \n …
Levi
  • 64
  • 7
-1
votes
1 answer

How to get token from Tower / AWX API?

I'm trying to access AWX API from a script Python. The documentation has the ressource /api/v1/authtoken/ for that, however when visiting the URL: https://myHost/api/v1/authtoken/ It says that it can't find the ressource. I also tried: response =…
Doc
  • 133
  • 1
  • 1
  • 10
-1
votes
1 answer

How to make an ansible playbook that works according to user input?

In my ansible playbook i am taking 2 inputs from user and i also wanted to take a third input which should be optional at times and if user provides the value for var3 then playbook must execute a task otherwise it should not, so what is the way to…
Yash Tandon
  • 345
  • 5
  • 18
-1
votes
1 answer

Executing curl command with variables in bash

I am using AWX curl for update template in bash script. Somehow this curl command is not able to run curl --insecure -v -X PATCH https://somedomain.corp.com/api/v2/job_templates/\"$test_2_template\"/ -H 'Authorization: Basic keys==' -H…
ruminy
  • 1
-1
votes
2 answers

adding remote N number of hosts to AWX

Installed Ansible AWX on CentOS 7 without docker. Want to add remote linux hosts(without password) to AWX and run play books and get the results. How to do it? Can any one help. One or two hosts I can add it in web page. How to add 100 remote hosts…
Gaffar
  • 1
-1
votes
1 answer

Take user input and make a new file in multiple lines

I want to take a user input from vars_prompt like:- Enter names:- apple orange and make a new file on a server with this output:- apple orange how can i achieve this using lineinfile or blockinfile modules?
rocknrollaki
  • 75
  • 1
  • 4
  • 11
-1
votes
1 answer

awx-db pod in pending mode

I just wondering where shall I open this port. If you could just give me an idea would be great. I am trying to add awx inside my kubernetes using this solution: https://github.com/rossedman/ansible-awx-kubernetes Facing the following problem: NAME …
-1
votes
1 answer

Ansible group_vars not automatically loaded

I'm running ansible 2.6.4 on python 2.7.5. This is my directory structure: inventory/all group_vars/all.yml group_vars/lab.yml playbook.yml ... This is my inventory/all: [lab] localhost all.yml contains a bunch of defaults, lab.yml has a few…
shaun m
  • 440
  • 1
  • 5
  • 15
-1
votes
2 answers

Ansible - Using or conditional in when:

I have the below code in tasks/main.yml --- - name: Check if service exists. shell: "systemctl status {{ service }}" ignore_errors: yes register: service_exists - name: Enable service and start if it exists. systemd: name: "{{ service…
-1
votes
2 answers

Extracting file persmission data in Ansible

I want to build a playbook to check File permissions of all the files in a directory and then create a report containing its details using Ansible. I tried using ACL module for this purpose but I can't understand where is the return list getting…
-2
votes
1 answer

secure way to make a connection between ansible awx and a VM on azure

I have a public VM on azure which I need to make private , I have ansible awx to make some installations and configurations on it in the future, what is the best and most secure way to establish the connection without exposing the VM to the…
tech-nerd
  • 1
  • 1
-2
votes
1 answer

parsing json data in ansible using shell

I am unable to read a list using shell module. It's working fo one element in list but fails for two or more elements. tasks: - name: Create a List variable and print it set_fact: UserRecords: [ "[3/2/23 9:09:04:013 GMT+5:30] 0000…
1 2 3
28
29