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
2 answers

Using variables within quoted strings in Ansible

Please take this working play example: - name: Display the URL hosts: all gather_facts: false vars: - host_domain: "testing.example.com" - default_url: "http://def.localhost.{{ host_domain }}" - my_url: "{{ some_undeclared_var |…
Rino Bino
  • 511
  • 5
  • 21
0
votes
0 answers

Checking missing nodes in microk8s cluster with ansible

I'm trying to automate servers configuration to deploy a microk8s cluster with Ansible My main playbook : - name: Getting connected nodes ansible.builtin.shell: "microk8s.kubectl get nodes -o wide | awk '{ print $6, $2 }'" register:…
Ben
  • 1
0
votes
1 answer

Using variables from task in following loop task

I want to deploy some stored procedures across multiple MSSQL instances on multiple server. In my playbook I have a task which gathers all the instances on a server which I use in the following tasks to loop everything on any instance. I use this…
Manu
  • 789
  • 4
  • 19
0
votes
1 answer

Ansible: Get n-th element of list

I have two variables: assets: holds a list of assets asset_index: holds the index I am interested in ("0" when printed via debug) How can I get the asset list entry at the specified position? - debug: var: assets[0] works but has the…
Hiran Chaudhuri
  • 113
  • 1
  • 7
0
votes
1 answer

Windows update through explicit Squid proxy - 0x80072EE6

I'll try to give a thorough rundown of the environment: anonymous proxy proxy must be set for Internet access 2 Squid proxies on RHEL8 behind an f5 - not caching 2 Windows AD DCs, both running 2019 Standard experiencing the issue. Both freshly…
Travis
  • 123
  • 8
0
votes
1 answer

Unable to show available updates with Ansible and dnf check-update

I have the following Ansible code for checking available updates on a Rocky linux server and showing them to user: - name: Check updates ansible.builtin.command: cmd: dnf check-update register: updates - name: Show result …
Madoc Comadrin
  • 570
  • 4
  • 11
  • 29
0
votes
1 answer

Microsoft Storage Powershell Module 'Get-Disk' doesn't list disks when Failover-Clustering is installed

I have 10 disks on a Windows 2016 Server. If I have the Windows feature 'Failover-Clustering' installed, the Get-Disk cmdlet only reflects two disks - even when the server is not yet part of a cluster. If I uninstall Failover-Clustering, the other…
0
votes
1 answer

Ansible Define Global Variables with When Contition

I want to define a global var (_cfg_chrony) based on Linux distributions: If the OS family is Redhat, define the config path of /etc/chrony.conf; if the OS family is Debian, define the config path of /etc/chrony/chrony.conf I tried to do something…
NeilWang
  • 383
  • 4
  • 14
0
votes
2 answers

ansible find: get path of a directory from register

Thanks in advance for any assistance. I can't seem to figure out what I am doing wrong hence why I am seeking some help. I wish to search for a folder using ansible, locate the folder and copy its contents to another directory. This is what I have…
nickyung
  • 1
  • 1
  • 2
0
votes
1 answer

Ansible - Alter Registered Variable

How can I modify the a registered variable? For Example, azure_network_interface_info.networkinterfaces[0].ip_configurations has public_ip_allocation_method which I'd like to change it to Static or Dynamic. Then use the ip_configurations array…
user630702
  • 495
  • 10
  • 32
0
votes
0 answers

Ansible playbook instead of Docker to run R Rcripts?

We are trying a setup that uses Ansible but not Docker. We are importing some RScripts that used to run in Docker. The Dockerfile that ran the RScripts began with: FROM rocker/tidyverse:latest This set up some paths and URLs for us, such as the one…
charlottesville
  • 153
  • 1
  • 6
0
votes
2 answers

Ansible module returns non json data

Ansible Azure module returns the data in a weird format Double single quoted characters. ''network_interface_names'': [''Ubuntu915''] As a result I can't use this anywhere to filter other resources. Any idea what can be done to fix this or make it…
user630702
  • 495
  • 10
  • 32
0
votes
1 answer

Ansible: how to run subsequent task for only newly created users?

The user creation policy in our organization is to force changing password on first login and use SSH keys for remote connections; the password is only used to run sudo or login locally. To force password change we commonly run chage -d 0…
Nikita Kipriyanov
  • 10,947
  • 2
  • 24
  • 45
0
votes
1 answer

With Ansible, should I limit SSH connections by IP?

I'm familiar with the standard Ansible best practices for secure connections (disabling root access for hosts and configuring key-based SSH authentication). Should I also use hosts.allow or iptables to prevent the hosts from accepting connections…
0
votes
1 answer

Are Jenkins Debian Repo keys necessary

I am in the process of migrating an application that needs a running Jenkins instance on the same server. The deployment of the application happens through Ansible. In the steps, there is a requirement for Jenkins keys and repo. Snippet from Ansible…
somya
  • 3
  • 2