Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
2 views

How to install and set ufw for Debian with Ansible?

Say I have a simple, local, Ansible playbook: - name: Establish a Debian-LAMP with some extras hosts: 127.0.0.1 connection: local become: yes tasks: - name: update the apt package index i....
0
votes
0answers
4 views

Using “become: yes” with some prefixed user (say “www-data”) for Ansible

In a remote machine with a latest Debian:Stable and a local Ansible (i.e an Ansible installed on the remote machine itself) I thought of deploying an Ansible playbook with become: yes as follows: I ...
0
votes
0answers
3 views

Ansible: Difference between the apt module and command: apt-get -y install X (module)

Consider these YAML code pieces which are two different parts of some Ansible playbook I found online: - name: update the apt package index i.e. apt-get update apt: update_cache=yes - name: ...
0
votes
1answer
13 views

Is there a book only about Ansible (without touching Vagrant, VirtualBox, Docker and virtualization stuff)?

I need a book only about Ansible (without touching Vagrant, VirtualBox, Docker and other above-shell stuff). About 6 months ago I tried reading the Ansible docs but these were totally un-...
1
vote
0answers
53 views

Is ArchLinux + Ansible for an all-default LAMP generally stable?

I usually establish IaaS LAMP environments with non rolling-release Linux OSs such as Ubuntu/CentOS but I consider using rolling-release ones like ArchLinux instead. it might be more efficient to me (...
1
vote
1answer
26 views

What Ansible does in cases there's a conflict between OS version and some software Ansible manages?

Say I use an IaaS cloud on which I installed Ubuntu 18.04 manually via the cloud company's OS installation tool and I ought to establish an all-ansible LAMP environment that will include some more ...
0
votes
1answer
38 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 --- ...
0
votes
2answers
28 views

ansible task -easy_install with requirements.txt file

I want to run easy_install task in order to install many modules in virtual environment. Is there an option to install all modules in requirements.txt file? as I understand it accept only one module ...
3
votes
2answers
29 views

Is it possible to consolidate notification handlers when they are very similar?

I have an Ansible role which uses handlers to restart services via the systemd module. - name: restart ntp systemd: name: ntp enabled: yes state: restarted become: true - name: ...
0
votes
1answer
14 views

Can a 5 US $ VPSE support VAD stack with 2 relatively-small CMSs?

I'm new to DevOps and quite troubled financially but I desire to put websites that I now host on a shared server environment (CetnOS 12.x.x) on some cloud like DigitalOcean or Lindoe (but without ...
0
votes
0answers
24 views

Background process not running after executing shell script

When I execute below script from cli it is working and process in background also running. But when i try to execute the same wcript from ansible all the tasks are successfully executing but ...
0
votes
1answer
21 views

VAD (Vagrant-Ansible-Docker) stack for Ubuntu and Apache

I'm having trouble establishing a Ubuntu-LAMP environment with continuous integration - I feel lost from the different solutions out there and time and again I fear that my vanilla-Bash Ubuntu-LAMP ...
4
votes
1answer
97 views

How does Vagrant differ from Ansible and Docker?

I understand that Ansible is a Configuration Management (CM) tool for orchestrating, deploying (and continuously upgrading) software and conf via a special YAML format created for that software, and ...
2
votes
0answers
36 views

How to test an ansible playbook using molecule inside docker locally?

When molecule is run on travis, the build is successful: $ molecule test --> Validating schema /home/travis/build/030/ansible-firefox/molecule/default/molecule.yml. Validation completed ...
1
vote
1answer
30 views

How to exclude a certain linenumber of an Ansible playbook when testing it using Molecule?

The aim is to exclude a certain line that contains a checksum and cannot be smaller than 80 characters. --> Scenario: 'default' --> Action: 'lint' --> Executing Yamllint on files found in /...
1
vote
0answers
38 views

How do I return just the full path of a file found with the find module in Ansible?

This has been reworded, expanded upon and clarified via an update late on 11/9/18. I request it be upvoted now that it has enough code. I want to find a softlink (to another file) in the $PATH ...
4
votes
3answers
52 views

Ansible Find Module

I am trying to use the Ansible find module to create a list of files to pass to the file module to change file permissions on files owned by a specific user in a directory that contains files owned my ...
2
votes
1answer
154 views

Jenkins-Ansible: executing ansible playbook using jenkins pipeline script

We developed declarative pipeline code to execute an Ansible playbook. We tested the playbook from CLI and it is working properly. My playbook actually performs some shell commands on remote server. ...
0
votes
2answers
29 views

Choice for scheduled task in AWS

I have deployed an AWS Lambda with Python 3.6 and CloudFormation executing a scheduled task which writes a JSON file once a minute to an S3 bucket. Now I wonder if this is a good way of doing it, or ...
1
vote
1answer
25 views

Cannot pull ansible docker image

$ docker pull ansible/ansible Using default tag: latest Error response from daemon: manifest for ansible/ansible:latest not found I try and get started with ansible but I get the above error message ...
1
vote
0answers
29 views

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

Hello I am 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 ...
1
vote
1answer
89 views

Passing variables between scripts in a Jenkins pipeline

I have a declarative Jenkins pipeline that looks like the following: pipeline{ agent { ... } stages { stage("Provision EC2 Instance and Set ENV Variable"){ ...
0
votes
1answer
25 views

vagrant box tests in gitlab-ci

I have a vagrant box, provisioned with Ansible that needs testing on github pull requests. Is it possible to setup CI test suite for the mirror in gitlab-ci without extra expenses on droplets? Or ...
0
votes
0answers
41 views

How can I get gs_secret_key and gs_access_key to use gc_storage module in Ansible

I need to create a directory in a Google Cloud Bucket using Ansible. I would like to know where I can find the values to complete "gs_secret_key" and "gs_access_key" to use "gc_storage" module in ...
6
votes
2answers
41 views

What are some clear benefits of running master/agent configuration management?

Ansible seems to have a clear advantage over competition like chef and puppet because it is agent-less and saves a certain degree of overhead. I have read several comparisons of the various ...
0
votes
0answers
37 views

How to communicate between two manged nodes without control nodes in Ansible?

I am new to Ansible. In salt using salt-call, we can communicate between two minions. Similarly, I wanted to know how in Ansible can one Managed node talk to another Managed node without using the ...
1
vote
1answer
71 views

How do I get the find module to work in Ansible?

My playbook does not create a /tmp/results.txt file, but I expect it to do so with the content of the results of the find module. Here is my playbook: - name: Do stuff become: yes hosts: fun ...
0
votes
0answers
21 views

AWS ElasticBeanstalk Clone Prod to a temporary environment to debug

Is there a good approach to create a copy of prod environment just for devs to debug a bug that couldn't be reproduced or is there any appropriate setup in multi-tenant situation with multiple ...
1
vote
1answer
43 views

Which password database system work with ansible?

Which password database system work with ansible to manage password of network devices and servers?
5
votes
1answer
133 views

How to keep configuration files automatically during apt-get upgrade or install?

When performing and apt-get update; apt-get upgrade -y on a server I encountered the message: Setting up sudo (1.8.16-0ubuntu1.5) ... Configuration file '/etc/sudoers' ==> Modified (by you or by ...
3
votes
1answer
55 views

tools to gather variant information from thousands of servers and update into database

Recently, I use ansible to gather information periodically from thousands of servers(which already installed collectd to gather CPU, memory, disks, netowrking info) in our company. For example: I ...
6
votes
1answer
182 views

What is ansible-runner about?

I've read the README file from the github repository as well as the documentation site of ansible-runner (from the official ansible project) but I don't understand what is ansible-runner about and in ...
0
votes
1answer
202 views

How to skip play in ansible-playbook?

I have 2 plays in my sites.yml file: - name: First play hosts: all remote_user: root roles: - role1 - name: Second Play hosts: all remote_user: ansible become: yes become_method:...
0
votes
0answers
40 views

Terraform Project Organization with AWS VPC Peering Connections

How best does one organize a project for AWS that makes use of peering connections. At present my folder structure looks like this modules/ staging/ production/ provisioning/ peering/ I'm also ...
0
votes
0answers
37 views

How to take a backup of Ansible tower?

Currently we have an awx running on a VM using containers: CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS ...
2
votes
1answer
86 views

Ansible YAML inventory - Groups that are allways members of other groups

Situation: I have a group "webservers" where I put all webservers in. As well as a group "mysqlservers" for the database servers respectively. Now I do also manage some LAMP servers and I want them ...
6
votes
2answers
386 views

Modify sudoers file with ansible playbook template

I am trying to create a sudoers file with ansible template. The sudoers file should look like below: Cmnd_Alias LS = /bin/ls Cmnd_Alias LESS = /usr/bin/less Cmnd_Alias DU = /usr/bin/du %support1 ALL=...
1
vote
1answer
165 views

How to write logs for certain tasks only?

I am using Ansible and created a Playbook for deployment. I defined log_path in ansible.cfg and now tasks output are going to this log file. I want to send only few task's log into this log file. How ...
2
votes
2answers
1k views

Applying ansible playbook to a docker container on a remote host

I have automated the setup of several docker containers with ansible. This works pretty well but there are certain recurring tasks that have to be executed within the docker containers. It is ...
0
votes
1answer
362 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 ...
4
votes
1answer
196 views

Ansible service module running state utility

Ansible v2.5 introduced a new "running" state for the service module, the doc is not saying anything about it. started/stopped are idempotent actions that will not run commands unless necessary. ...
0
votes
0answers
122 views

Ansible not able to connect to Ubuntu server/container (Error: Permission denied)

When I am running my ansible play book I am getting an error as below. details are given below. I am rinning the ansible-playbook on localhost (CentOS7) and connecting to docker containers. It's ...
3
votes
0answers
87 views

How to properly automate CM based on log events?

Let's say I have a number of tools like Docker bench security, some static security scanners, etc. Now I have let's say free Ansible edition (no expenses are considered). I have lots of logs, but not ...
2
votes
1answer
123 views

ansible tower_project module, always getting “ansible-tower-cli required for this module”

I have a control host that has the following: ansible --version = 2.5.2 tower-cli --version == 3.3.0 tower-cli is able to connect to a remote Ansible Tower instance (note, Ansible tower itself is ...
1
vote
1answer
55 views

Ansible playbook to ensure Ruby gems are installed

Can I use ansible to make sure certain Ruby gems are installed on a list of Windows 7 hosts? How do I do this?
4
votes
1answer
352 views

problems running Ansible with become on domain-connected Windows Server

I am running several tasks on a Windows 2016 server with Ansible including: Joining it to a domain SOMEDOMAIN SOMEDOMAIN\SOMEUSER has been added to the local administrators group on the machine with ...
3
votes
1answer
2k views

Ansible Jinja template if statement

This is a snippet from my Ansible jinja template which populates an environment specific template. docker_compose_mq: <string-passed from Jenkins> docker_compose_profiles: "string" {% if "{{ ...
3
votes
1answer
154 views

Specify default arguments for Ansible playbook

When I create playbooks I often add a comments section at the top on how to run the Ansible playbook. With more options becoming available in Ansible, the list of command-line arguments also seems to ...
7
votes
1answer
257 views

How to notate ipv6 addresses in inventory file?

I have a machine, that is accessible via ipv6 only. It is setup for ssh with rsa key. Now I'd like to manage it with ansible. Unfortunately, this is not covered in the inventory documentation. So I ...
2
votes
1answer
48 views

Why screen folder in /var/run disappears in Docker container after running Ansible playbook?

Files I've got the following Dockerfile: FROM ansible/ansible:ubuntu1604py3 ENV DEBIAN_FRONTEND noninteractive RUN pip3 install ansible RUN printf '[local]\r\nlocalhost ansible_python_interpreter="...