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 add LDAP group for ssh access by ansible playbook?

I have LDAP Group. superproduct1 In LDAP Group has some users: developer1, tester1, analitic1, project1 I want to create ansible playbook for add LDAP group to SSH access on host. Found only ...
0
votes
0answers
5 views

Chef vs Ansible: will configuration be applied if connection is lost during configuration pulling/pushing?

Scenario Configuration management tools like Ansible or Chef often ha a master/controlling machine and the machines they controlled (agents). What if the connection between master and agents is ...
0
votes
1answer
11 views

ansible aws windows ec2 - Internal Error: this connection module does not support running commands via sudo

I am getting below error when I am trying to run one playbook which connects to Windows machine hosted on AWS EC2. I enabled winrm and win_ping worked fine but when I am invoking ansible-playbook I am ...
0
votes
0answers
22 views

Zero downtime deployments for multiple api backends

Question: How can I achieve a zero downtime deployment of my php application to my two backend servers, that are sitting behind a nginx load balancer? Reason The application powers an API for a ...
0
votes
1answer
11 views

How can I issue a Let's Encrypt certificate with Ansible when 'challenge_data' cannot be found?

I am attempting to use the Ansible acme_certificate module to acquire a Let's Encrypt TLS certificate. I have successfully generated the private keys, CSRs, etc, and then started the challenge using ...
5
votes
2answers
73 views

How can I eliminate the need for an Ansible control machine?

Ansible is great for deploying infrastructure, but it requires you to have a control machine. This adds the burden of manually setting it up and securing it, and then pulling down your playbooks and ...
1
vote
3answers
68 views

Can Ansible use a local repository?

I have multiple hosts and my playbook has apt, pip modules to download necessary packages from repositories. When any (apt,pip) download module attempt to download packages, it does it for each host ...
0
votes
1answer
10 views

Can I check whether ansible is on last batch of rolling update (serial: 25%)?

I'm using Ansible to update a pool of EC2 servers with a rolling update, in batches of 25%. In between batches, I'm pausing long enough for the server health checks to start to pass again (since they'...
0
votes
0answers
13 views

Need help with massaging data from ansible modules

I have retrieved data from Azure using the azure_rm_*_facts modules, and have ended up with some data (after tweaking) like this: { 'nics': [ { 'fw01port01': { 'ip': '10....
2
votes
1answer
40 views

Ansible How to use plugin parameter

In Ansible, I want to use a plugin parameter. For example, the profile_tasks plugin supports a parameter to "Adjust the sorting output of summary tasks". I enable this plugin by whitelisting it in ...
3
votes
1answer
37 views

Ansible how to know what return value is provided by a specific module

From Ansible's official doc Ansible modules normally return a data structure that can be registered into a variable, or seen directly when output by the ansible program and Ansible modules ...
0
votes
1answer
27 views

Trying to execute an appcmd command via Ansible [closed]

I trying to execute the below command and running into errors ... I tried with quoting around the arguments, that didn't help either - name: Add authorization rules to FTP site win_command: ...
3
votes
1answer
40 views

Configuring Zookeeper from Ansible

I'm trying to configure a Zookeeper Cluster with Ansible. As you might know Zookeeper has two important config files. zookeeper/conf/zoo.cfg I create this file on each cluster member using this ...
7
votes
1answer
587 views

How to solve “E405: Remote package tasks should have a retry” in Ansible?

E405 v4.0.0 Remote package tasks should have a retry Package operations are unreliable as they require network communication and the availability of remote servers. To mitigate the potential ...
5
votes
3answers
71 views

What are tools that lend themselves for backup and recovery in a CI/CD environment?

I have used tar, dump, Amanda, Legato (EMC) Networker and other backup software for making backups of systems. However, I don't know the best tools for making backups in a CI/CD (Continuous ...
3
votes
1answer
69 views

Is there a system which automates everything (OS release, and above) to host websites on?

This is not really a DevOps question but more of a System Automation question (which DevOps covers only a part of, by popular opinion, so I hope it's okay). I feel like some 5 USD IaaS VPS with ...
0
votes
2answers
82 views

Should local Ansible playbooks be loaded each day/week with cron?

I ssh into a remote 5$ debian:stable IaaS machine with Putty. The machine has only debian:stable and Ansible installed on it and I run an Ansible playbook locally on it with my current working user (...
-1
votes
2answers
81 views

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

Consider these YAML tasks which are based on two different parts of some locally-executed Ansible playbook I read here: - name: Update the apt package-index cache i.e. apt-get update apt: ...
0
votes
2answers
49 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-...
0
votes
2answers
38 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 ...
-1
votes
1answer
45 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
45 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
33 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: ...
1
vote
2answers
26 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
48 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 ...
-1
votes
1answer
26 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 ...
5
votes
1answer
113 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
110 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
54 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
1answer
57 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 ...
5
votes
3answers
81 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
542 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
40 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
42 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
101 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
724 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
89 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
77 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 ...
7
votes
3answers
59 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
41 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
234 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
23 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 ...
2
votes
1answer
48 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
239 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
75 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
344 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
319 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
57 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
64 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
246 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 ...