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
1
vote
2answers
224 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
101 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
2k 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 ...
1
vote
1answer
212 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'...
4
votes
1answer
171 views

How to use a 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 ...
6
votes
1answer
10k 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 ...
-1
votes
1answer
309 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: ...
4
votes
1answer
532 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
2answers
949 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
228 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
2answers
143 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
436 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 (...
-2
votes
2answers
919 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: ...
1
vote
3answers
211 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
50 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
68 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 --- ...
1
vote
2answers
667 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
53 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
29 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 ...
-1
votes
1answer
52 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 ...
7
votes
1answer
431 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
1answer
2k 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
984 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
3k 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
379 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
2answers
9k views

How to execute an ansible playbook using a 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. ...
1
vote
2answers
90 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
644 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 ...
4
votes
1answer
928 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: ...
4
votes
1answer
33k 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
866 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 ...
7
votes
3answers
94 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 ...
1
vote
1answer
2k 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 ...
2
votes
1answer
57 views

Which password database system work with ansible?

Which password database system work with ansible to manage password of network devices and servers?
12
votes
1answer
3k 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
315 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 ...
13
votes
2answers
3k 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 ...
2
votes
2answers
10k 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:...
1
vote
1answer
1k 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
1k 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 ...
9
votes
2answers
10k 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
847 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 ...
5
votes
2answers
10k 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 ...
3
votes
3answers
7k 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
423 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. ...
5
votes
1answer
118 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
738 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
339 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
2answers
4k 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 ...
6
votes
2answers
22k 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 "{{ ...

1
4
5
6 7 8