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
0 answers

ansible proxmoxer, 'Connection timed out. (connect timeout=5)'

I try to deploy some container to proxmox via ansible+hookscript with proxmoxer. I follow the documentation to install both proxmoxer and requests on controller (workstation) and node (proxmox) First of all i tried to reach the proxmox api with…
proxyd43
  • 152
  • 1
  • 2
  • 12
0
votes
0 answers

Tagging behavior in a playbook with a role which contains an "include_role" task

Having this structure: Playbook(play2.yml) - hosts: localhost roles: - name: genrole tags: - genrole_tag # tagging is needed, since other roles may be present just below current one Major…
0
votes
0 answers

Failing to create Digital Ocean Droplet with firewall

I am trying to create a firewall and then create a DO Droplet with that firewall added to it. Here's my playbook: - hosts: localhost vars: digital_ocean_token: '{{ lookup("env", "DO_API_TOKEN") }}' ephemeral_ssh_key_pub: '{{ lookup("env",…
0
votes
0 answers

Deploying VM from VM template on vmware vCenter with Ansible makes network unreachable

OS: Oracle Linux 8.7 vCenter: 7.0.3 build 20051473 hypervisor: VMware ESXi, 7.0.3, 19193900 ansible-playbook [core 2.13.5] python version = 3.8.10 (default, Nov 14 2022, 12:59:47) [GCC 9.4.0] jinja version = 3.1.2 libyaml = True I'm deploying a VM…
0
votes
2 answers

Running a local script on local host with Ansible

I have a python script which is able to retrieve the IP adress of my remote node, and as a pre-task of my ansible playbook I would like to run this script and set the IP adress. Is there a command in Ansible which would allow me to do this ?
hugo2410
  • 1
  • 1
0
votes
1 answer

ansible print folder path from register variable

I'm trying to print just the path of a register var that has multiple values, however I can only print a specific value. how can I print multiple values? --- - name: find directories find: paths: "{{ item }}" recurse: yes …
rigged
  • 1
0
votes
2 answers

conditional statements should not include jinja2 with dictionary list

How do I get rid of this warning? The task works as expected but I would like to do it correctly I have tried to fish out the value for ansible_facts.services["{{ component }}.service"].state and save it in a variable without any success. --- -…
Nifle
  • 374
  • 1
  • 8
  • 22
0
votes
1 answer

ansible logrotate issues with postrorate script

Below is my ansible role > defaults/main.yaml $cat roles/logrotate/defaults/main.yml logrotate_conf_dir: "/etc/logrotate.d/" logrotate_scripts: - name: test log_dir: '/var/log/test' log_extension:…
0
votes
1 answer

Ansible: read csv file line by line and render it to template with loop

I am using a csv file to get data and render it to template and copy to remote servers. I am facing issue that CSV file read twice for same server and this results in loop to copy last line in each server instead of 1st line in first server and…
0
votes
1 answer

How to start netcat listening server in Ansible?

I'm working on larger Ansible playbook. One of the tasks I'd like to use is to do "TCP ping" using netcat. On one of the hosts, I'd like to start a netcat 'server', and then start the 'client' to send any string to the server. I'm testing this…
zbro
  • 27
  • 6
0
votes
1 answer

I cannot download MySQL ConnectorJ with ansible anymore

I have a task that looks like this: - name: Download {{ mysql_connector_download_url }} ansible.builtin.get_url: url: '{{ mysql_connector_download_url }}' dest: '{{ mysql_connector_download_dir }}/{{ mysql_connector_download_file }}' …
koenig
  • 125
  • 8
0
votes
0 answers

Ansible xml add_children not working

I have an ansible playbook in which I try to add xml elements to an xml file (tomcat-users.xml) as follows - name: Update Scheme Option in tomcat-users.xml add role user elements become: yes become_user: tomcat xml: file:…
eliassal
  • 101
  • 1
0
votes
1 answer

Supplying variables to an Ansible script for upgrading Payara

I'm attempting to write an Ansible script to upgrade a Payara instance to a newer one, by taking a backup of the domains on the current installation, nuking it, installing the new version of Payara and then restoring the backup that was just made to…
0
votes
0 answers

Installing OpenStack with Ansible fails during Keystone playbook on TASK openstack.osa.db_setup

I am trying to create a two machine deployment following Openstack Ansible Deployment Guide. The two machines are named targethost01 and targethost02, and I am running Ansible from deploymenthost. Every machine has 4-Core CPUs, 8 GB of RAM, and 240…
jmhal
  • 1
0
votes
0 answers

Ansible playbook to read vars from plaintext file and log file checksums

In the process of learning ansible I am trying to create a playbook to run on some email hosts to gather sha1 hashes of the files. I have a plaintext file with the path and filenames the playbook needs to check. It is formatted as…
dj423
  • 23
  • 3