Questions tagged [ansible]

Ansible is an IT automation tool. Use this tag for questions regarding the Ansible IT automation tools.

Filter by
Sorted by
Tagged with
0
votes
1answer
11 views

Running ansible_pull from systemd: git/ssh credentials?

I currently have a home server (old laptop) I'm provisioning with Ansible in the classical push fashion, by pushing from my personal computer to it. This works, but requires me to push after every ...
0
votes
0answers
14 views

Ansible machinectl rootless docker [Ubuntu]

I'm trying to install a rootless docker via ansible but it doesn't work. My system is Ubuntu 20.04 server. The executed ansible-task is: - name: Make sure rootless-docker is installed become:...
0
votes
0answers
26 views

Can Ansible git-module install the latest tag from a repo?

I want to install recent, but not the HEAD. Instead, I'd like to install the most-recent tag of a remote repository -- on the assumption, that this is, what the maintainers consider a "release&...
0
votes
0answers
21 views

How could I do a list from an AWS account listing all running instances?

I'm using AWSCLI at Windows 10 Professional with GitBash. I need to have a list of all running AWS instances by account. Will start doing in an account to make a list to populate the public keys from ...
0
votes
1answer
21 views

How to create a own CA bundle for import in FireFox using Ansible

I am trying to create certificates for my own CA. After importing the CA certificate ca-mydomain.com.crt into FireFox my website doesn't work but displays message Secure Connection Failed An error ...
0
votes
0answers
9 views

Convert host_vars YAML to my.cnf config file via jinja2

please advice on how to create jinja template from mariadb settings. I have /path/to/ansible/host_vars/server.com/: myvar_mariadb_services: max_allowed_packet: 1024 key_buffer: 512M I ...
0
votes
0answers
24 views

Ansible: Some Community.Windows Modules Not Working

Control node: MacOS Catalina running ansible 2.10.9 with Python 3.9.5 Managed node: Windows 2019 Server Hi, I'm using a couple of ansible modules in a playbook from the Community.Windows collection: ...
0
votes
1answer
24 views

Ansible debug permissions of ansible scripts

I have a user AAA, and set my remote path (successfully) to /home/AAA/.ansible_tmp/, and ansible successfully ssh'ed into the box with AAA, and I still get permission denied on the python scripts of ...
0
votes
0answers
19 views

Ansible win_shell system cannot use the file specified

I'm trying to use winget command through ansible win_shell module, but machines keep telling me that "System cannot use the file specified.". When I check the location of the exe with (Get-...
1
vote
1answer
30 views

Ansible check mode giving error on copy task

I am running a playbook in check mode meaning I run the playbook with the --check flag. I need to transfer files from one node to the ansible control node and then from the control node to a remote ...
0
votes
0answers
26 views

Transfer multiple files from one remote machine to another using ansible

I need to run a task on ansible that copies multiple files from one remote machine to another. I have read some similar topics and one suggestion is to use the ansible synchronize module. The syntax ...
0
votes
0answers
16 views

Installing particular version of Nginx using Ansible Playbook

My agenda is to write Ansible Playbook for installing nginx-1.8.1. But I couldn't install the specific version of Nginx using my below playbook. Getting error as "Failed to install some of the ...
0
votes
0answers
16 views

auto configuration Windows

Sometimes I must configuration Windows (or Linux). It simple task like (add websites to trasted, add certificate to console and Firefox, display hide folders in Windows, configuration mail client for ...
0
votes
0answers
13 views

Need to update new ssh public key on all target hosts using CyberArK

I can do this using Ansible. However, I would like to know detailed steps; if cyber ark has a feature or function to update a new public ssh key on all target hosts(Linux) authorized_keys file? Also ...
1
vote
1answer
774 views

Ansible - Python - Docker: Module not found docker / docker-py — WHY No module found error is coming in Python prompt and in Ansible

Ansible 2.8.3 When I run my playbook, I see the following error. TASK [deployer_role : Creating network] ************************************************************************************************...
1
vote
0answers
290 views

Ansible installed via pip3, but Ansible commands not found

I have installed Ansible via pip3, but I can't find the Ansible commands (ansible --version, ansible-playbook, etc.) Here's the listing that shows that Ansible is installed via pip3: :~# pip3 list | ...
0
votes
0answers
18 views

Issue with ansible variables “not found\n/bin/sh”

I am working on an ansbile playbook. I define my variables in the playbook itself rather than using a different method. For my first few tasks where I use the variables the task execute successfully ...
0
votes
1answer
17 views

Error while running ARA server on Alpine linux

I am trying to install the latest version of the Ansible Records Analyzer server on an alpine Linux I made sure that all requirements are well installed ( Django, GCC,python3, Pypi, ansible) the ...
0
votes
1answer
47 views

Not able to copy a file with ansible

Learning Ansible, and mine is windows 10 machine. I enabled the windows feature, Windows Subsystem for Linux(WSL) and then installed Ubuntu app. Then installed ansible as described here. Now I ...
0
votes
1answer
23 views

Ansible Customizing a local log file that contains multiple tasks outputs from a playbook

In my playbook I have two major tasks one task that change the gateway last digit for Debian machines and the second one applies to Redhat machines everything works fine but to be able to trace the ...
0
votes
0answers
17 views

How to configure openstack’s network under Cents 8

I’m trying to setup an openstack cluster on Centos 8 VMs. according to the official guide under: https://docs.openstack.org/openstack-ansible/victoria/user/network-arch/example.html The network ...
2
votes
1answer
36 views

Jenkins SSH Host/User Certificates workflow

How to setup SSH key signing process every time some Ansible stage runs? Or at some interval at least. I have pipeline which creates VM's with the Terraform and then runs Ansible. At cloud-init stage ...
0
votes
0answers
193 views

Ansible won't copy files from /etc directory but will from others (ansible.errors.AnsibleFileNotFound: Could not find or access)

Ansible Version=2.7 I am trying to copy files from the local machines to a remote machine using an ansible playbook. The playbook is simple: - name: Copy file to remote become: yes copy: ...
0
votes
0answers
357 views

'dict object' has no attribute 'stdout_lines' (ansible error)

Using ansible 2.7.7. I am trying to register the output of a variable and then later use the variable. I'll add my code: -name: Register hostname as variable shell: hostname -f register: ...
1
vote
1answer
98 views

Why is ssh-keygen generating two types of keys between Ubuntu 18 and Ubuntu 20?

I have two virtual machines. VM1 is on ubuntu 18.04 VM2 is on ubuntu 20.04.1 When I ssh-keygen on VM1 it gives me an RSA private key. When I do the same thing on VM2, its giving me an OpenSSH ...
1
vote
0answers
21 views

Icinga2 node setup fails. “Too many arguments. At most 0 arguments must be specifed”

Icinga Version: r2.10.3-1 I am trying to use an ansible playbook to automate my icinga client configuration. When i run the icinga2 node setup command in my playbook I get the error I mentioned in the ...
0
votes
1answer
54 views

Ansible Conditional Role Dependencies

I have a question that has been bugging me for quite some time and I cannot find a proper way to handle it. I read all the documentation I could get, but I cannot find a satisfying answer. Consider my ...
0
votes
2answers
26 views

Ansible created user on Windows, gets “.EC2AMAZ-ELNOCH3” appended to username

I have created a Windows Server 2019 AMI using Packer, and Ansible as provisioner. I have added a user jenkins, and copied SSH files (public/private key, known_hosts, authorized_keys) to C:\Users\...
2
votes
1answer
3k views

Ansible error “ Could not find or access on Ansible Controller”

I am trying to write an ansible playbook to send certificates to my client machines from my local machine. The error message I get is: msg": "Could not find or access '/etc/icinga2/pki/...
0
votes
0answers
19 views

Ansible Tower Artifacts new stdout

Hello Ansible community :) I modified the purpose of the Artifacts in the Ansible Tower, what I mean is, I use the Artifact text box to return the output I want in a better, cleaner format. My ...
1
vote
0answers
80 views

cannot download repodata/repomd.xml

I'm training for my RHCE 8 EXAM, and I have to: Create a playbook with the name setupreposerver.yaml to set up the control host as a repository host. Make sure this host meets the following ...
0
votes
0answers
15 views

how to set up mail accounts in evolution (or other email package) on the command line or with ansible

I try to automate the setup of users with ansible and would like to set up the mail accounts in evolution (or any other linux email package) but cannot find any support for email account setup in ...
0
votes
2answers
515 views

“hostname: command not found” CentOS 8

On CentOS 8 the hostname command was removed. With seemingly no way to get it back. No documented way at least Duckduckgo tells me. The problem with this approach is that the whole world expects the ...
0
votes
1answer
393 views

Ansible windows update module how to install ALL updates

Is there a way to use the win_updates module in ansible to install ALL updates without having to specify every update category manually on the playbook?
0
votes
0answers
47 views

Logging a user in to create a session from a console session

I am using ansible to launch an interactive window of a program in a users session with psexec. e.g. psexec -i 2 -d notepad.exe Users will RDP on to the machine at a later date and I wanted them to be ...
3
votes
2answers
423 views

Ansible - ignore whitespace differences in lineinfile

I am starting to look into using ansible for maintaining a set of servers. I have ran into a difficulty with lineinfile. I am setting up rsyslog and want to make sure a few lines are in the /etc/...
0
votes
0answers
169 views

Installing Ansible on a Mac

I tried to install Ansible with pip. For some reason it complained about two dependencies, instead of installing them: nose and tornado. I installed them manually. But now, when I retry to install ...
0
votes
1answer
63 views

Fail to comparison item_var against ansible_hostname

I'm working with ansible version 2.9.13 and I'm trying to modify the following task -which btw is working fine - so I could compare a list of given hostnames stored in a yml file against the fact ...
0
votes
1answer
17 views

Do configurations in containers always work on VMs or BareMetal Machines?

I'm currently writing my master's thesis. I am testing infrastructure Code. For that the infrastructure is built with containers. I install Software and configure everything with Ansible. A key ...
0
votes
0answers
19 views

Ansible hanging when trying to connect to this host

When I try to target this one specific host via ansible, the process just hangs indefinitely and i have to ctrl+c out of it. sshing to the host via terminal works fine. Here is what the /var/log/auth....
0
votes
0answers
348 views

change user password who has expire password date with sshpass

My servers have password date expire user. I want to write a script or ansible playbook for this. I try below command but I have failed. Is there any way do this with ansible? or Which command can I ...
1
vote
1answer
150 views

Ansible paramiko ssh stuck when to escalate privilege command

I have sandvine devices based on freebsd I need to create playbook for multi-automation purposes but am facing issue when I need to escalate my privilege, the only way to escalate privilege is through ...
1
vote
1answer
1k views

Disable root password via ansible-playbook on Ubuntu 18.04

I'm currently trying to disable root login for an ubuntu 18.04 machine via ansible playbook. If I ssh in I know I can type passwd -l root to do this. Is this the way to do it via ansible playbook? ---...
0
votes
1answer
713 views

Rename a file with native Ansible functions

I need to identify a set of files in a directory and rename all those with a .repo extension. Is it possible to do it with native Ansible functions? If it's not possible I'll use a pure and hard shell ...
0
votes
0answers
27 views

Mac:Ansible: How to delegate to localhost ansible inventory file after fetching inventory from remote server and exporting to local ansiblehosts file

Below module gives error as it cannot find Linux tag in local ansible host file even after fetching hosts information from a remote server and tag as Linux(and nodes under this tag)and then exported(...
0
votes
0answers
30 views

RHEL7 to Windows 7 via Ansible. Unreachable on one installation; working on another

I am attempting to do a win_ping to a fresh version of Windows 7 my employer gave to me. I do not believe there is an issue in any playbooks, etc, as the exact same playbooks work on a previous ...
0
votes
1answer
118 views

sudo twice become method for Ansible

I have to deal with a setup in "/etc/sudoers" that I can't change because the servers in question are managed by a different team and they don't want to change it. I have root access only by ...
0
votes
2answers
2k views

How to collect selective dsks and unused space using ansible facts?

Here are my example codes, questions at bottom hw.j2: System Total Memory : {{ ansible_memtotal_mb }} Free Memory : {{ ansible_memfree_mb }} System Total CPU : {{ ...
0
votes
0answers
46 views

How to add a repository with Ansible on CentOS 8?

In CentOS 7, Ansible has the yum-repository module that can be used for adding repositories. In CentOS 8 there exists the dnf module for package management, but there doesn't seem to be a dnf-...
1
vote
1answer
163 views

Difference between hosts: localhost and connection: local

Running the task on the localhost can be achieved in different ways. I do not understand if there is a difference between the way the two tasks are executed below or if they are exactly the same thing....

1
2 3 4 5