Questions tagged [ansible]
Ansible is an automation tool ("IT orchestration engine", per the company web site) for the deployment and configuration of applications and systems.
514 questions
1 vote
1 answer
108 views
Is the Playbook I Wrote Secure and Effective?
This is my first time posting here, and I’m quite excited. I’ve written a playbook and would like to know whether it achieves the intended results fully, and if there’s anything I should improve or ...
0 votes
0 answers
33 views
Impossible to set up shared clipboard on vms handled created with Vagrant
I am trying to automate the deployment of a cybersecurity lab. My goal is to have a repeatable process to create a Debian-based with all my tools and configs. To this extent, I recently discovered ...
6 votes
2 answers
852 views
Ansible will not accept the quoting that it is telling me to add
I'm writing an ansible playbook, which I'm fairly to. I'm having issues with ansible-playbook complaining about my quotes, which from my understanding are correct. I've tried 3 things described at the ...
2 votes
3 answers
297 views
Choose timezone in now() Ansible function
This Ansible Jinja template function now(utc=true,fmt="%H:%M:%S") allows to get the current timestamp in the specified format, in UTC. How can one get the timestamp in their local, or ...
2 votes
1 answer
232 views
Fapolicy blocking Ansible on RHEL 9
I work in a STIG environment with Active Directory integration for logins. When I try and run an Ansible script, my RHEL 9 machines return back the following error: "module_stdout": "/...
2 votes
1 answer
83 views
How to correctly handle apostrophes in Ansible templates for SQL statements?
I wrote an Ansible playbook to grab information from some YAML files and store it in a MariaDB database. It uses this Jinja SQL template: REPLACE INTO mytable(hostname,fqdn,owner, ...) VALUES {% for ...
0 votes
0 answers
33 views
How to add IGMP protocol with Ansible builtin redhat.rhel_system_roles.firewall role
I want to add an IGMP protocol to firewalld on a RHEL9 host. I could easily achieve it by running the following command: firewall-cmd --add-protocol=igmp However, things become different when it comes ...
2 votes
2 answers
251 views
Get rid of \n in Ansible Jinja template
I have written an Ansible playbook to insert data into a MySQL database. It uses this Jinja2 template: INSERT INTO mytable(hostname,foo,...) {% if hostvars[h]['something'] is defined %} VALUES (`{{ ...
1 vote
0 answers
743 views
Error: Connection activation failed: IP configuration could not be reserved
I am provisioning RHEL 9 machines via an Ansible playbook that contains this task: - name: Set DNS server community.general.nmcli: conn_name: "{{ conn_name | default('ens192') }}" ...
0 votes
2 answers
184 views
Ansible error in date formatting
To get today's date, I'm using this variable in a Jinja template: {{ now() | ansible.builtin.strftime('%d/%m/%Y') }} However, it fails with an error ansible.errors.AnsibleFilterError: Invalid value ...
0 votes
2 answers
119 views
dnf tries to update Java package despite being versionlocked
On several of my RHEL 9 machines managed by Ansible, the java-1.8.0-openjdk package is versionlocked: - name: java-1.8.0-openjdk-1:1.8.0.402.b06-2.el9 state: present However, Ansible tries to ...
0 votes
1 answer
143 views
Ansible - Failed to install some of the specified packages
This is my ansible-playbook: --- - name: "Setup local Fedora 41 system (root) Base" hosts: localhost connection: local become: yes tasks: - name: Install packages ...
0 votes
1 answer
172 views
What is changing /etc/sssd/sssd.conf?
I have an Ansible playbook that writes to /etc/sssd/sssd.conf this Jinja template (variables are defined somewhere else): # This line is just to check that the file is written correctly [sssd] ...
0 votes
1 answer
80 views
How to automate key distribution prior to Ansible being deployed?
How do admins typically distribute Ansible .pub keys to clients in an early environment? Do they just script that can run ssh-copy-id to multiple machines? I've looked at other forums and users said ...
0 votes
1 answer
498 views
Joining domain via Ansible returns error "Already joined to this domain" while via shell is OK
I'm getting a strange message with Ansible. On a RHEL 9 server, I can join our domain via the shell command line realm join example.xyz --user=svc-ansible --computer-ou="OU=Linux Servers, OU=...