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.

Filter by
Sorted by
Tagged with
-1
votes
0answers
5 views

Cannot get past “realm: Couldn't join realm: Not Authoerized to perfrom this action”

name: Add targeted machine to domain become_user: expect: command: /bin/bash -c "/usr/sbin/realm join --user={{ prompted_user }}@domain.com domain.com responses: Password for .*: "{{ ...
3
votes
2answers
119 views

Ansible, only disable existing users?

I have a list of users in a yaml files, with a flag: state. If the flag is undefined or if it is != "absent", I create the user : - name: "create account for {{item.name}}" ...
0
votes
1answer
22 views

Failing play prevents later 'localhost' play from executing

I've written the following playbook. I expect an error from the second play, but the first and third to run. What I get is the first running, the second failing, and the third is completely ignored. ...
1
vote
1answer
50 views

Ansible: change item value from vvsets.yml

I looking to replace item value to storage name storageA. 1.File vvsets.yml. vvsets: [{'key': 'lun.101', 'value': ['server001']}, {'key': 'lun.101', 'value': ['server001']}, {'key': 'lun.201', 'value':...
0
votes
0answers
51 views

Incorrect sudo password after manually changing the password

Consider this simplified ansible task where I create a user with a salted password: // vars name: "foo" password: "pwd" salt: "salt" // task - name: Setup users user: ...
0
votes
0answers
18 views

Ansible interface data missing on Cisco devices

When using IOS_facts, subset interfaces, I can gather information on configured interfaces such as IP address, subnet etc. But for tunnel interfaces, I can't see source address, destination address, ...
0
votes
2answers
33 views

Check if job is running on another server in the same network using Ansible

On a private Network, I have two servers, let's call them server01 and server02. They are in the same network. The second server is rebound server i-e if server01 is no longer active, the second ...
0
votes
1answer
21 views

How access ansible dictionary ansible_net_interfaces sub branches

I'm trying to read information from ansible_net_interfaces, but the interface names will be different on each device. I'm having no trouble accessing most information, but when I get to ipv4, there's ...
1
vote
1answer
90 views

Ansible - Avoid duplicates between group and host vars

I'm new at using ansible for server management and I need some help managing users and group's membership definition according to host and hosts-group, with a minimum of duplication and a maximum of ...
1
vote
0answers
22 views

How to convert and save raw data to PDF format using ansible

I will be getting some raw data directly from an API. I want to format this and convert into PDF file and save it. I gone through ansible modules. I am not getting any idea in this. Can someone ...
2
votes
0answers
26 views

Ansible: redownload archive only if src has been changed

I have the following task: - name: Download foobar tool unarchive: src: https://github.com/foobar/releases/download/v1.0/foobar.zip dest: /usr/local/bin/ remote_src: yes creates: /...
1
vote
0answers
58 views

Why is ansible not setting the seuser properly on this directory?

Here is the relevant portion of the ansible file: - name: "Create bond user" user: user: bond shell: /bin/bash - name: "Allow bond agent to be run" sefcontext: ...
0
votes
1answer
51 views

How to merge two files into single file using ansible in remote server

I need to merge two files without duplicate entries in it. is there any way i can achieve it through ansible modules. Ex i have two files /etc/hosts1 and /etc/hosts2. I need to have one /etc/hosts ...
1
vote
1answer
42 views

Extracting part of the string using Ansible regex_search and save the output as a variable

I'm having a content like below inside a file. dataDir=/var/lib/zookeeper 4lw.commands.whitelist=mntr,conf,ruok,stat syncLimit=2 I wanted to read the value for dataDir using Ansible and set it to a ...
0
votes
0answers
24 views

Ansible file module not deleting files for dictionary

My program basically keeps the latest three backups and deletes the rest of them. When I check it is not deleting the files. Below is my code. No error was generated. When i check the server the file ...

15 30 50 per page
1
2 3 4 5
84