Skip to main content

Questions tagged [ansible]

Use this tag for questions about Ansible, an open-source automation engine, related to using Ansible for topics such as cloud provisioning, configuration management, application deployment, etc.

Filter by
Sorted by
Tagged with
37 votes
6 answers
6k views

How to test provisioning and configuration in Ansible setup?

Looking at trying to build some resilience into our Ansible setup which deals with provisioning and configuration. I understand a few methods of testing on the configuration side of things but I'm ...
Naphta's user avatar
  • 627
4 votes
1 answer
2k views

ansible AWX is connecting through ssh as root instead of user defined in credential

I'm running ansible 2.6.2 and awx 1.0.7.2 on rhel 7.5. AWX is connecting to my ssh proxy as root instead of the defined Credential user. My playbook contains the following become: yes become_method: ...
olveram's user avatar
  • 41
20 votes
2 answers
12k views

What is Ansible's config equivalent of `--vault-password-file`?

According the help of ansible-playbook one could use --user=REMOTE_USER to define the ssh user, but one could also define ansible_ssh_user: REMOTE_USER in either the host- or group_vars. Question ...
030's user avatar
  • 13.2k
13 votes
2 answers
4k views

How do I run Ansible Azure playbooks while avoiding storing credentials in files?

Background We use Ansible to provision and manage Azure infrastructure. At the moment we run Ansible "manually" i.e. we manually execute playbooks for various automated tasks. No CI infrastructure. ...
Vish's user avatar
  • 601
6 votes
2 answers
25k views

Ansible temp dir change

Ansible version 2.9.2 Is it possible to change ansible temp dir for one playbook only? I have VMs with r/o root. So, the playbook fails. Even if I run my playbook under root user on target VM it can'...
Kirill Vakhrushev's user avatar
3 votes
3 answers
14k views

Ansible - Handler not found on first attempt

Command run: sudo ansible-playbook site.yml --connection=local Distributor ID: Ubuntu Description: Ubuntu 18.04 LTS Release: 18.04 Codename: bionic ansible 2.5.5 I'm encountering ...
Eric Saindon's user avatar
2 votes
1 answer
605 views

Can I create an Azure VM from Ansible with NICs in different resource groups?

I am working on creating an Ansible playbook to Ensure required network resources for an Azure VM are present, and Create an Azure VM attached to those resources. Due to the way the organization ...
Vish's user avatar
  • 601
2 votes
2 answers
3k views

Ansible - Copy multiple files

I am trying to copy multiple files to the target like so: tasks: - name: "Copying files" copy: src: files/{{ item }} dest: /my/folder/ with_items: - file.txt The files ...
Kyu96's user avatar
  • 135
0 votes
1 answer
1k views

Multiple shell commands not executing with shell module

For some reason this fails: - name: "Get GPG key from the Jenkins portal" get_url: url: https://pkg.jenkins.io/debian-stable/jenkins.io.key dest: /usr/share/keyrings/jenkins.io.key ...
Skegg's user avatar
  • 103
-1 votes
1 answer
73 views

A cloud technology with automatic upgrades of my OS-release and web server release?

I desire a cloud technology that will redund my need of using Vagrant to continuously integrate OS release upgrades (say from Ubuntu 18.04 to 20.04 including all software installed by apt-get --- ...
user avatar