Skip to main content

Questions tagged [ansible]

On-topic questions are concerned with the use of the tool itself. Installing Ansible and prerequisites, connection issues, ... are off-topic. Red Hat Ansible is a model-driven, configuration management, multi-node deployment/orchestration and remote task execution system. It uses SSH by default, so there is no special software to be installed on the nodes you manage. Ansible is written in Python but can be extended in any language.

0 votes
0 answers
19 views

Problem with connecting to hosts in gitlab-ci + ansible + bastion

I am running ansible-playbook in gitlab-ci with executor docker. To add a private key to the container, I use ssh-agent: before_script: - eval $(ssh-agent -s) - chmod 400 "$...
Vasai's user avatar
  • 89
0 votes
0 answers
21 views

ansible reporting failed_modules ansible.legacy.setup

I am running ansible core 2.11.12 on my Foreman server. Some times when I run my ansible roles against new Rocky Linux 8 hosts I get the following: fatal: [host01.example.net]: FAILED! => {"...
Systemgeek's user avatar
-3 votes
0 answers
21 views

Testing ansible roles with molecule and docker

While I was watching the four-year-old 101 by Jeff Geerling I noticed a few differences in the output of my commands. So I decided to update my knowledge and look into the official molecule ...
MaKaNu's user avatar
  • 898
-2 votes
0 answers
17 views

Validation to Jenkins/Ansible framework

I am handling patching through a combination of Jenkins and ansible. Jenkins calls ansible scripts for each tool and performs stop and start before the patching scripts. What is the best way to add ...
real_name_hidden's user avatar
2 votes
1 answer
72 views

How to get the available Python versions on Remote Node?

I have some machines with different properties and different installed versions of Python. Now I want to write a task that returns all available Python versions on every machine (some have 2.7.x, some ...
user26423314's user avatar
0 votes
0 answers
18 views

AAP2 workflow - ERROR! conflicting action statements: hosts, gather_facts

I created a workflow for provisioning vm from a template on vCenter. In this workflow I have a first node of type template job that redirects on a second node according to the response to a survey ...
diegz's user avatar
  • 1
0 votes
0 answers
18 views

Ansible - Bad HTTP Response

I installed Ansible on a VM and want to automate Windows Updates on Windows Hosts. When i try to ping the hosts with the command: ansible test -m win_ping -vvv i receive a Bad HTTP Error client.xxx.DE ...
Ray61's user avatar
  • 1
0 votes
0 answers
30 views

Unable to upload zip.bin file using uri module

Using: ansible==2.10.5 ansible-base==2.10.17 I'm trying to convert a play where I'm using shell module to upload a file using curl to use URI and nothing works for me - name: install via shell ...
Batchen Regev's user avatar
-1 votes
0 answers
29 views

Unable to Run Ansible Playbook on Multiple Hosts

I have a bare-bones Ansible (2.16.8) playbook that I'm trying to run for all hosts in an inventory group, but it doesn't seem to be working correctly. It always seems to work for at least one host, ...
beef623's user avatar
  • 19
1 vote
1 answer
44 views

How to show specific number of lines in Ansible debug task

How to show only the first five lines of the hostvars variable in Ansible? - name: "Show Ansible hostvars var" debug: msg: "{{ hostvars }}" # How to stop after 5 showed lines?...
CH06's user avatar
  • 157
2 votes
1 answer
32 views

Unable to parse query a value node corresponding to a name node from a XML using Ansible

I have a XML from which I need to parse a value using Ansible. Below is the XML: <?xml version="1.0" encoding="utf-8"?> <Activity xmlns:xsi="http://www.w3.org/2001/...
Hari3090's user avatar
1 vote
1 answer
52 views

Ansible ini_file append an option instead of replace

This is in reference to ansible-collections/community.zabbix Issue #1294 "RHEL9 zabbix-agent package upgrade fails when installed with community.zabbix.zabbix_agent". Basic ask is to disable ...
Troy Ward's user avatar
0 votes
0 answers
52 views

ansible-builder doesn't create the introspect.py script

I'm building an execution environment with ansible-builder. Every time I run it I get this error: #24 0.269 /usr/bin/python3: can't open file '/output/scripts/introspect.py': [Errno 2] No such file ...
jeremywat's user avatar
  • 732
1 vote
1 answer
41 views

Is there a better alternative to importing roles in Ansible?

I'm trying to write a playbook that either installs and uninstall a custom tool depending on a parameter passed in at runtime. For this purpose I've defined a role to install it and another to ...
Maikol's user avatar
  • 345
0 votes
1 answer
43 views

How to effectively access nested JSON objects in Ansible

I have a JSON structure mentioned below and i am not sure how to traverse lower down in the hierarchy: "json": { "count": 5, "next": null, "previous"...
kuda's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
1524