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
1 answer

How to assign a static IP with molecule-podman?

As the generated inventory look like a pair of instance name - ip (see above), I need to test recipe using the variable ansible_host with an IP value and not the instance name. So the generated inventory look like: [all] idm…
bioinfornatics
  • 166
  • 1
  • 7
0
votes
2 answers

Ansible says Invalid options for debug: ansible.builtin.debug

I've been quite busy building a script. At some point I need to generate a password and store it in a file. The password is generated with - name: Generate new password debug: ansible.builtin.debug: var:…
0
votes
2 answers

Ansible with_items not looping

I think I've been at this too long, but I cannot for the life of figure out why my second with_items is not looping like my first. I already tried using a json_query like in the first task, which did not help. Task: - name: Set backing_lunuuid …
BrillCom
  • 139
  • 2
  • 9
0
votes
0 answers

Failing execute yum from ansible on centos 8

I have a problem updating Centos 8 systems due to repositories. This is my task and it works on Red Hat and Almalinux: - name: Install the latest version of yum-utils become: yes become_method: sudo yum: name: yum-utils state: latest …
0
votes
1 answer

How to register Ansible actions in Windows Event Log?

Ansible: 2.9 Windows: W2k16 Server I'm searching for a method to register (log) Ansible actions in remote Windows host. For example, when I work with win_command module for echo test command, I can't find lines referring to this action in Windows…
CH06
  • 13
  • 1
  • 5
0
votes
1 answer

Ansible - No such file error when activating systemctl Podman user socket

I am running an Ansible playbook on a fresh Oracle Linux 8 system. It includes a step where it asks systemctl to activate a user Podman socket like so: - name: Enable podman socket vars: userid: ansible_facts.getent_passwd.{{ ansible_user_id…
hpy
  • 845
  • 3
  • 18
  • 28
0
votes
0 answers

Ansible simple inventory for dhcp hosts in yaml

Need a little hint on yaml syntax for a very simple inventory file. I want to include dhcp range of workstations in a nice inventory file. Regarding the official documentation this could be done but i'm not on the right track Need a little…
infoman33
  • 1
  • 1
0
votes
1 answer

Ansible - how to loop through services present in inventory file

winapp.example.comHello, I have an inventory file that holds both windows application servers, web servers and only respective services which need to stopped or restarted. Requirement is only specific services should be stopped for group of hosts.…
0
votes
1 answer

Ansible; add hosts to inventory by script

I just started working with/learning to use Ansible. I want to add hosts to an inventory file using a script, and I am wondering if there is a command line tool to accomplish that. Something that looks like this; ansible-inventory -i inventory.yml…
Douwe
  • 15
  • 5
0
votes
1 answer

match item.x value with inventory_hostname

I need some help with matching inventory_hostname with item.host (from vars_file). What is the best way to do that? I couldn't figure out this as i am a newbie. My requirement is: I must call all hosts from inventory file. I must match item.host…
Atif
  • 11
  • 1
0
votes
0 answers

referencing variables from defaults/main.yml in ansible role

I have a role setup as follows roles/test/task/main.yml - name: Generate people files template: src=test.j2 dest=/tmp/{{ item.name}}.cfg loop: "{{people}}" roles/test/template/test.j2 First Var: {{ item.var1 }} Second Var: {{ item.var2…
pizzaguy39
  • 1
  • 1
  • 1
0
votes
0 answers

Ansible playbook to post message into kafka topic

Playbook 1: --- - name: Message into topic hosts: web1 become: yes tasks: - name: post message expect: shell: "/usr/local/kafka/bin/kafka-console-producer.sh --broker-list localhost:9092 --topic testTopic" responses: …
Dev_Sri
  • 1
  • 2
0
votes
2 answers

creating a linux local update mirror (cache) and automating it

Hi i run a few different linux distributions and architectures and have some from server so slow that they update in KB/s for example with ubuntu on ARM. I'm learning up automation, how would i go about creating a local only linux…
0
votes
1 answer

How to add values to ansible-playbook instead of overwrite it?

As per today, I have the following role, this role simulate a basic installation of the product: - name: Install Server.msi primary_appserver ansible.windows.win_package: path: C:\product.msi log_path: C:\InstallProduct.log arguments: …
Hiddai
  • 87
  • 1
  • 3
  • 14
0
votes
1 answer

ansible/jinja extract multiple attributes from complex json return, rejecting specific matches

I'm trying to extract multiple attributes from a complex payload returned from an API call while rejecting members that have a certain value in the 'name' field. Consider the following payload: { "npod_volumes": { "changed": false, "failed":…
Apatt
  • 11
  • 3
1 2 3
99
100