Questions tagged [ansible]

Ansible is an open-source software platform for configuring and managing computers. It combines multi-node software deployment, ad-hoc task execution, and configuration management.

Ansible is an open-source software platform for configuring and managing computers. It combines multi-node software deployment, ad-hoc task execution, and configuration management. It manages nodes over SSH and does not require any additional remote software to be installed on them. Modules work over JSON and standard output and can be written in any programming language. The system uses YAML to express reusable descriptions of systems.

The platform was created by Michael DeHaan, the author of the provisioning server application Cobbler and co-author of the Func framework for remote administration. It is included as part of the Fedora distribution of Linux, owned by Red Hat inc., and is also available for Red Hat Enterprise Linux, CentOS and Scientific Linux via Extra Packages for Enterprise Linux (EPEL) as well as other operating systems. Ansible was commercially supported and sponsored by AnsibleWorks. Since October 2015 Ansible is owned by RedHat.

It was named by DeHaan after the fictional instantaneous hyperspace communication system featured in Orson Scott Card's Ender's Game.

1762 questions
0
votes
2 answers

How to print a specific line from file based on UUID defined in variable?

I wanted to print the specific line from /etc/fstab based on UUID defined in a variable. But when I'm trying with below code it is not giving proper results. Code: --- - name: check hosts: all become: true tasks: - name: set fact for…
0
votes
0 answers

runas become returns Win32ErrorCode 1314: A required privilege is not held by the client

and thanks in advance for reading and support. I keep running into the error mentioned in title when using runas as become method from my Ansible controller towards Win10 Pro 22H2 host. I did my research on various forum resources, but none of them…
0
votes
1 answer

ansible pause not working with when conditionals

example play: - name: WTF debug: msg: THIS WORKS "{{ inventory_hostname }} UPGRADE VAR IS "{{ upgrade }}" when: upgrade and inventory_hostname is regex("switch.*a") - name: Wait for routes to be removed pause: prompt: "Wait 30 seconds…
Dave0
  • 23
  • 2
  • 4
0
votes
1 answer

Ansible playbook with 'async' outputs out of order when executing on multiple servers

I have a playbook that is suppose to run a script on 5-10 servers in parallel - name: Run script & cleanup ansible.builtin.shell: | ... bash {{ SCRIPT }} ... args: executable: /bin/bash async: 1800 poll: 60 I have to add…
Subzero123
  • 49
  • 1
  • 6
0
votes
0 answers

Openstack ansible aio network configuration

I did a fresh install of OpenStack but am unable to connect them to the internet. Some informations around the environment: 1 physical nic, one vlan configured to be used as second nic. Mac-Addresses are not allowed to be exposed to the outside…
0
votes
1 answer

How to share ansible variables between loop tasks

I'm trying to create a Fortinet FortiManager automation with their Ansible collection. I've created a dynamic ADOM creation task which runs in a loop and now I'm trying to run another dynamic tasks that creates CLI templates inside all of the…
cr0c
  • 958
  • 4
  • 16
  • 35
0
votes
1 answer

kolla-ansible openstack bootstrap-servers failed on enabling ceph apt repository (ubuntu 22.04)

This is to deploy the recent kolla-ansible openstack. The problem happens since last week. I retested it on a good environment successfully deployed on 7/14/2023 and got bootstrap-servers failed this time. The environments use Ubuntu 22.04 and…
0
votes
0 answers

Not able to execute shell commands in ansible control node

Need your suggestion pls. The below one is ansible file which calls an python file in the control node(localhost) and process an excel file which is also present in control node based on hostnames. There is no issue in processing the excel and now I…
user984993
  • 23
  • 3
0
votes
0 answers

Trigger a Ansible-Playbook when i create a VM in Netbox

Is it possible when i create a Virtual Machine in Netbox that can trigger an Ansible-Playbok what add stuff? for example Create the VM in CheckMK with the details whats written in Netbox. Thanks everybody for Answering.
0
votes
1 answer

Want to Use Ansible Lineinfile Module to Insert Private IP Addresses from Hosts in the zookeeperservers Inventory Group

I need to modify a line in a configuration file with the private IP addresses of the hosts in the zookeeperservers inventory group. The config file is an .xml file. The key word in the config file is "Connect String">. There are 3 hosts in the…
David S
  • 3
  • 1
0
votes
1 answer

How to specify an exclusion pattern in an inventory file

Is it possible to define a group with an exclusion pattern, when defining this group in an inventory file? group1: hosts: xxx-[1:100]: group2: hosts: xxx-2: xxx-37: # This should contain the hosts from group1 without the hosts from…
jeb
  • 355
  • 3
  • 11
0
votes
0 answers

Passing variable to next playbook in awx workflow

I'm having difficulties with the following setup: AWX deployed in a self hosted k8s cluster Playbooks are using the AWX-EE Playbooks are executed in a workflow template as follows: START -> 1. EC2 Inventory Sync -> 2. Playbook Repo Sync -> 3.…
Marc
  • 26
  • 2
0
votes
1 answer

Ansible: ERROR! 'shell' is not a valid attribute for a Play

--- - name: Extract PS output. shell: "ps -ef | grep pmon" register: pmon - name: Display PS output. debug: msg: - "{{ pmon.stdout_lines }}" Error: ERROR! 'shell' is not a valid attribute for a Play The error appears to be…
Learner
  • 3
  • 2
0
votes
2 answers

Ansible error: The offending line appears to be:

I am getting code error in Ansible as below. please advise on this. ERROR! We were unable to read either as JSON nor YAML, these are the errors we got from each: JSON: Expecting value: line 1 column 1 (char 0) Syntax Error while loading YAML. …
Learner
  • 3
  • 2
0
votes
1 answer

Ansible: [WARNING]: The input password appears not to have been hashed

I'm facing an issue while using Ansible 2.9.27 on RHEL 7 to automate my infrastructure, specifically when working with encrypted passwords in my tasks. When utilizing the password option of the ansible.builtin.user module to provide an encrypted…
sebelk
  • 682
  • 4
  • 13
  • 32