Questions tagged [ansible]

Ansible is an IT automation tool. Use this tag for questions regarding the Ansible IT automation tools.

Filter by
Sorted by
Tagged with
1
vote
2answers
59 views

How to fix dnf install on Centos 8

I need this command to work: $ dnf install postgresql12 Now it raises an error: No match for argument: postgresql12 Error: Unable to find a match: postgresql12 However, if I specify repo, it ...
0
votes
0answers
35 views

jenkins hosts unreachable - build failing

In my jenkins - build fails in every few days and it shows the below error/message -- (this job is running on my jenkins slave machine) Build o/p - ok=52 changed=5 unreachable=1 failed=0 ...
1
vote
1answer
12 views

Ansible running process as wrong user

I have the below playbook, the problem is that last task that is supposed to start the process does not run the process as the NGINX_USER, it always runs as root, which was never specified anywhere. I ...
0
votes
1answer
25 views

Is there a way to indicate that your PC need a reboot after an upgrade?

So I've got a windows 10 iso file and i know that i can start windows Upgrade quietly, now the issue is that Im trying to make the silent upgrade using ansible and ansible need some indication that ...
0
votes
0answers
76 views

Ansible failing to ping Windows host from my MACOS using ansible

ansible all -m win_ping xx.xxx.xx.xx | FAILED! => { "msg": "winrm or requests is not installed: No module named winrm" } Below are my settings Source Machine MacOS: Pywinrm is installed ...
0
votes
2answers
59 views

Unable to write the entries in /etc/fstab

I am using below playbook to write the entries in /etc/fstab & to create swap file: --- - name: Configure SWAP hosts: localhost become: yes become_user: root tasks: - name: ...
0
votes
1answer
24 views

Can we use ansible roles as variable on runtime with --extra-vars?

I have a couple of roles that I need to call while provisioning the server with --extra-vars option in ansible-playbook command. Can someone help me to achieve the same? Can i use include-role option ...
0
votes
1answer
41 views

Printing task names when running ansible adhoc commands

I need to run some roles from command line for testing and sometimes I have some adhoc tasks to apply. So I use ansible to run the role. For example: $ ansible all -i 192.168.1.123, -m include_role -...
0
votes
0answers
47 views

ansible acme create account

I'd like to handle nginx let's encrypt certifs' renewal with ansible. So I've tried to use the module acme_certificate and acme_account. I have difficulty to understand how is created the acme account....
1
vote
1answer
511 views

Ansible Copy module & become - Permission denied

I am running an ansible script on localhost to copy a folder to another location. However, - name: Copy Network become: yes become_user: root copy: src: /d/ dest: "/dest/d/" mode: ...
1
vote
1answer
112 views

How could I connect ansible by ssh into 2 Vagrant machines (Virtualbox Hypervisor)?

I would like to connect by ssh one machine with another to do ansible commands. I have a CentOS7 and want to connect inside the OS to Ubuntu16 VM. Look at my Vagrantfile and what I tried: Vagrant....
1
vote
0answers
194 views

ansible awx/tower command timeout

everytime a task of my playbook failed becaus it triggered the command timeout command timeout triggered, timeout value is 10 secs... My question is how to increase this value. I already tried with ...
0
votes
0answers
97 views

Best practice for using Ansible from both CLI and AWX/Tower

Although the question creation form warns me that my question appears to be subjective, I still hope there are some good answers to this question that might help a lot of people. Are there any best ...
0
votes
0answers
94 views

Ansible AWX credential fallback

I want to create a basic bootstrapping playbook in Ansible AWX which should ensure that all other playbooks can access my machines. The machines can be in the following states Given user and ssh key ...
0
votes
1answer
31 views

BIND9 configuration, which allows DDNS updates and configuration-mgmt updates in the same time?

Not sure if it is possible at all, but I am trying to find solution for such setup: BIND9 server, managed by Puppet(https://github.com/ajjahn/puppet-dns), Puppet populates zone files for all static ...
1
vote
0answers
68 views

Ansible YAML indentation

How to highlight ansible indentation using vim or any other text editor? I have tried https://github.com/k1LoW/emacs-ansible, but cant able to get highlighted
0
votes
1answer
96 views

How to join a windows machine to an AD domain automatically?

I can add any user to a windows ISO using packer and add that user to the local administrators group. The question what is the best way to automate the step of joining a newly created windows machine ...
0
votes
0answers
79 views

Configure SQL Server listening port with Ansible

I installed SQL Server Express Edition in remote Windows machine using Ansible-playbook, Ansible module "win_chocolatey" and Chocolatey package "sql-server-express". Here is my Ansible-playbook task: ...
3
votes
2answers
295 views

Ansible awx could`t gain access to script with copy: , script: and template: modules

I'm trying to write an Ansible playbook which will take a bash-script, stored on the same virtual machine, transfer this script to another virtual machine and then execute it. I've played this script ...
0
votes
0answers
24 views

How to transform a iptables rule to firewalld rich_rules?

I have this rule in iptables -t nat -A POSTROUTING -s <source> -o <interface> -j MASQUERADE I understand the rule, I just want to transfer it to a rich rule, so I can use it in ansible ...
1
vote
1answer
94 views

Ansible : Use pattern for group_vars

It is possible to create a group_vars file for a AND group ? Example, group_vars/DMZ:&WEB It is possible to do something such ? Thank you very much
1
vote
1answer
1k views

Ansible playbook fails to assign static IP address with vmware_guest module

I am attempting to build a VM from template with ansible. I need to specify IP address. All other configs work in the playbook. It is not a syntax issue. This is a lab so I do not have a vlan to use ...
0
votes
1answer
359 views

Upgrade mongodb replicaset docker container using ansible

Trying to update mongodb in my docker container from 3.6 to 4.2 using ansible, but docker container keeps restarting. The reason it restarting is because the compatibility level is set to 3.6. More ...
0
votes
3answers
6k views

Ansible “provided hosts list is empty” error

I created an inventory file has .yml extension like below: --- all: server1 hosts: server2 children: hana: prod: client1: hosts: ...
0
votes
0answers
24 views

Setting up email alerts from multiple devices running OSSEC

I frequently deploy new, or reuse old Raspberry Pis for all kinds of projects and have developed an Ansible script to quickly set up a fresh installation with basic security features like a firewall ...
0
votes
0answers
21 views

ping on vagrant machine is not working

I am trying to ping on "192.168.0.23". But somehow it is not working. This is my vagrant file: PROJECT_NAME = "petalandstem" BACKEND_DIR = "/home/vagrant/#{PROJECT_NAME}/src/backend" FRONTEND_DIR = "...
2
votes
2answers
375 views

Does OpenSSH support multihop login?

Ansible uses OpenSSH as the bottomed network communicative implementation, but does it support multi-hop login? I mean, if Ansible can login a server directly, but can it log in server_a then from ...
0
votes
0answers
15 views

Deploying Django and Nginx by Ansible

I have followed this tutorial to deploy django, nginx and gunicorn. and now I have a django website on nginx. Now I want to do these things by Ansible. I searched alot but I have no idea where should ...
0
votes
1answer
337 views

Installing ansible in old RedHat 7

I'm trying to install Ansible in a old RedHat. I have already update all packages using yum. > sudo yum install ansible Loaded plugins: product-id, search-disabled-repos Resolving Dependencies --&...
0
votes
0answers
558 views

How to download a ZIP file from Jfrog Artifactory using ansible( I don't have internet to my target server).What is the other methods available

My ansible playbook is not downloading zip file from jfrog artifactory. I used get_url and curl commands.My target server i don't have any internet. To perform CD i want a download a zip file which i ...
1
vote
0answers
165 views

Ansible 'shell' task fails while the command can be executed directly on the host

I have a task in my playbook to kill all the processes of a given name: - name: stop twd if running #shell: ps auxww | grep 'twd' | awk '{print $2}' | xargs kill -9 shell: pkill pwd ...
0
votes
0answers
66 views

How to verify Registry key changes in GUI

I am currently using Ansible to automate the updating of the registry keys of a Windows 2016 Server machine. I am able to achieve that however I have a question in regards to verifying that the ...
0
votes
1answer
326 views

Ansible using Kerberos fails on Windows host if Basic authentication is not enabled

I'm trying to configure a Windows Server 2019 host with Ansible, using Kerberos as the transport protocol for WinRM. I had initially run the ConfigureRemotingForAnsible.ps1 script on this host while ...
0
votes
1answer
307 views

Vagrant SSH's fine but Ansible is unable to ping (it's unable to SSH)

Here is my Vagrantfile. $ cat Vagrantfile # -*- mode: ruby -*- # vi: set ft=ruby : # All Vagrant configuration is done below. The "2" in Vagrant.configure # configures the configuration version (we ...
0
votes
1answer
121 views

Using Ansible to execute tasks on remote user but got illegal instruction for /usr/bin/python

I am currently working on ansible automation for running a task on remote host. I've done all preparing work such as SSH configuration and all works perfect until I meet the issue which says illegal ...
0
votes
1answer
908 views

Ansible Role Not Found

I'm running ansible(2.8.4) on a playbook built largely by operator-sdk on WSL(Ubuntu 18.04). I am receiving the following error. ERROR! the role 'DistZilla' was not found in /home/####/projects/dist-...
0
votes
1answer
100 views

Ansible 1.5 still failing find host

Can u spot anything wrong on host definition below? # ansible --list-hosts -i inventory -m fortimgr revision.yml No hosts matched root@vuwunicoids0001:/home/scripts/fortimanager# cat inventory [all:...
0
votes
1answer
295 views

How to specify which ping to use for each host group?

I have three hosts set up in a virtual environment in order to test things out before deployment. I was wondering if there's a way to specify that when I use: ''' ansible all -m ping ''' To ping ...
0
votes
1answer
1k views

Deploy Vm Vmware with simple Ansible playbook

I try to test one simple playbook with ansible. My goal is to create a new VM with it. --- # create a new VM from a template - name: VM from template hosts: localhost gather_facts: false ...
0
votes
0answers
370 views

Install PyVmomi on MAC

I am running Mojave on my MAC. I am trying to use the Ansible Vmware_guest module which requires "PyVmomi" I have installed pyvmomi and pyvim via pip and brew. They installed successfully on both ...
0
votes
1answer
82 views

Ansible create a vm

I would like to use Ansible to create a Linux vm from a template and then run Ansible to configure the box. The template is just a base install without anything else. Once the VM is built the next ...
0
votes
0answers
99 views

Contrail-ansible-deployer - Remote Compute Deployment [Collector down]

I try to deploy environment with remote compute feature. Here is my instances file : remote_locations: pop2: BGP_ASN: 12345 SUBCLUSTER: pop2 XMPP_SERVER_PORT: 5269 ...
1
vote
1answer
361 views

Ansible variables template issue

I have a template in Ansible to make a config file for Prometheus. I would like to add hosts dynamically, using variable prometheus_hosts. This variable is defined in host_vars per each host, but ...
0
votes
1answer
185 views

Ansible module for symlinks

Is there a standard Ansible module for manipulating symbolic links (a wrapper of mklink)? file does that only for Linux win_file windows counterpart omits such functionality
0
votes
1answer
1k views

Ansible stuck at gathering facts

as read in many other posts and questions gathering facts during exectution o an ansible-playbook may take some time and can get stuck for several reasons. In my case the behaviour is pretty weird: ...
0
votes
0answers
95 views

Ansible AWX, how do I source inventory from file without SCM?

I am having trouble figuring this out. I created a manual project in the web gui and then placed an inventory.yml file in the /var/lib/awx/projects/ folder. When I try to source it however, I get the ...
0
votes
1answer
93 views

ansible yum install command

ansible all -m yum -a "name=java-openjdk state=present install_root=/opt/" I am getting following error 127.0.0.1 | UNREACHABLE! => { "changed": false, "msg": "Failed to connect to the host ...
1
vote
1answer
138 views

How to run ansible playbook with multiple files

I adapted this playbook for rhel https://github.com/matisku/ansible-teamcity-server I am familiar with running single yaml file by using ansible-playbook I am not sure how to run this yaml playbook ...
0
votes
0answers
20 views

Can't get ifconfig from vagrant servers with Ansible

while reading a site: https://code.tutsplus.com/tutorials/automate-all-the-things-with-ansible-part-one--cms-25931 i tried to get IP addresses of created vagrant servers with Ansible, but got error. ...
0
votes
0answers
72 views

How to get a secure connection on mattermost deployed by ansible on AWS

I am trying to set up HTTPS on mattermost on AWS using ansible. However, I keep getting: This site can not provide a secure connection When I go check the logs of mattermost I see that: TLS ...