Questions tagged [ansible]
Ansible is an IT automation tool. Use this tag for questions regarding the Ansible IT automation tools.
265
questions
0
votes
0
answers
135
views
ansible automatic apt upgrade and all find modified configuration file
With ansible do an automatic apt upgrade from all our servers. That is no problem, but as a result we want to see only the "configuration file" which has kept, so we could check them ...
1
vote
1
answer
3k
views
How to output verbose logging from powershell that is being called by an Ansible playbook
I have an ansible playbook, similar to this:
- name: Run Powershell script with Parameters.
win_shell: MyPS.ps1 -Param1 "{{ Param1 }}"
and within the Powershell script I ...
2
votes
2
answers
38k
views
Ansible fails to create temporary directory
I am trying to use a jumpbox to reach my target VM on ansible.
I have the following file structure
play.yaml
hosts
serverA
serverB
testServers/
serverX
serverY
group_vars/
all....
0
votes
0
answers
321
views
How to correctly shutdown widows systems via ansible
We have a working setup for ansible with windows via ssh. I know ssh is officially not supported, but the following behavior is more random:
For our laptops I want to shut them down via ansible after ...
4
votes
3
answers
21k
views
Ansible Copy module & become - Permission denied
I am running an ansible script on localhost to copy a folder to another location.
However,
- name: Copy Network
become: yes
become_user: root
copy:
src: /d/
dest: "/dest/d/"
mode: ...
0
votes
1
answer
2k
views
Linux RHEL 7 - Ansible - Execute command in shell is normal but got file not found/permission denied when run via script
I have an Ansible body as follow
- name: install
command: sh /installScript.sh
args:
chdir: /home/cust/
then I execute my playbook using this
ansible-playbook -i my_inventory....
2
votes
1
answer
1k
views
Update OS Via Ansible Determine What Distrubution Major Version
I've created an Ansible role that consists of no more than tasks and some variables. Probably overkill at this point but I plan to expand on the role sometime in the future. I'm attempting to first ...
2
votes
3
answers
3k
views
Ansible : Configuring a Windows Host
I'm trying to set a windows Host through a VM using mac M1 but I'm having the following issue :
UNREACHABLE! => {"changed": false, "msg": "Failed to create temporary ...
2
votes
1
answer
5k
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?
---...
1
vote
0
answers
46
views
Map a vagrant disk to ansible host file
I'm trying to create partitions in Vagrant vm and to map them to an ansible host file but the play that i'm running is not recognizing them.
Here's the Vagrantfile configuration:
Vagrant.configure(&...
1
vote
1
answer
261
views
How to assert a specific minimum Java version before running an ansible task?
I would like to ensure Java is installed and the oldest acceptable version is 11.
How can I achieve that in ansible?
I have tried
- name: Fetch Java version
shell: java -version 2>&1 | grep ...
0
votes
1
answer
3k
views
Ansible playbook execution using Jenkins on remote node throwing file or directory not found error
I have been trying to run Ansible playbook.yml file from Jenkins using Jenkins's Ansible plugin, but it is throwing file or directory is not found error. However, I crossed checked paths more than ...
0
votes
0
answers
958
views
Building wheel for ansible (setup.py) ... error, unable to install ansible
I am trying to install ansible via pip, but installation failed with these errors.
Basicly the core ansible is installed but I have a feeling that not all modules/ ansible_collections are installed
#...
0
votes
0
answers
273
views
Accessing WSL2 filesystem on localhost through WinRM
Is it possible to somehow access WSL2 filesystem (say \\wsl.localhost\Ubuntu\home\foo\bar) when WinRM remoting into localhost using certificate based authentication method?
I am trying to do so from ...
1
vote
1
answer
268
views
How can I start the PF service without interrupting existing connections?
I have an Ansible playbook that starts the PF firewall. It freezes at this point because the SSH connection between the target and the host Ansible is executing on is interrupted as a result of this. ...