Questions tagged [ansible-playbook]

468 questions
0
votes
1 answer

Ansible - jenkins plugin failing on Google Container Engine (GKE) - infinite loop with ingress

I have such config for ansible: - hosts: localhost connection: local tasks: - name: Jenkins - add job jenkins_job: config: "{{ lookup('file', 'jenkins_conf/pipeline_staging.xml') }}" …
0
votes
1 answer

Ansible: Pip install directly from s3 using s3 module

How do I Pip install directly from s3 using s3 module in Ansible? with git I would: - name: Install module from git repo pip: name=\"git+git@bitbucket.org:MYORG/REPONAME.git\" executable=/usr/local/bin/pip2.7 sudo: yes Can I do the same with s3…
Gil Zellner
  • 183
  • 1
  • 8
0
votes
1 answer

Ansible facts discovery returns some values as empty

I have a very simple script in /etc/ansible/facts.d which is used to discover the local SSL certs on a host. This is the code: #!/bin/sh echo "{ \"testkey\": \"testvalue\", \"crt\": \"$(/usr/bin/base64 -w 0…
replay
  • 3,240
  • 14
  • 17
0
votes
2 answers

Ansible: find and replace with remote IP

I am using Ansible for auto apache configuration in which i have own app.conf. Now I have app.conf in ansible server and want ansible to replace the existing ip address with remote ip address. my app.conf look like this.
Deven
  • 61
  • 1
  • 4
0
votes
1 answer

How to set a value got from one server to another server with ansible?

Follow this guide install Kubernetes cluster: https://kubernetes.io/docs/getting-started-guides/kubeadm/ Master Server $ kubeadm init (got token value here) Check token # kubeadm token list TOKEN TTL EXPIRES USAGES …
cloud_cloud
  • 165
  • 2
  • 4
  • 15
0
votes
1 answer

Ansible installs the Windows patch successfully but yet exits with fail code

fatal: [hostname.domain]: FAILED! => {"changed": true, "cmd": "wusa.exe C:\\Temp\\Windows8.1-KB3042553-x64.msu /quiet /norestart", "delta": "0:00:00.109333", "end": "2017-04-11 04:57:09.337190", "failed": true, "rc": 5, "start": "2017-04-11…
0
votes
1 answer

FHIR Server Installation

I want to install my own FHIR server on ubuntu machine with the help of this link. smart-on-fhir/installer But when i run this command sudo ansible-playbook -c local -i 'localhost,' -vvvv site.yml, it gives following error. Please give some idea,…
0
votes
1 answer

Ansible conditional lists

I'd like to deploy to different directories depending on a flag. I saw there was --extra-vars which allows passing in a variable, so let's say, --extra-vars "flag=test" or --extra-vars "flag=prod" Now I'd like to either use the test_* or prod_*…
djb
  • 125
  • 2
  • 7
0
votes
1 answer

Can't return os family using ansible_os_family

I am trying to get the OS family of my host machine using ansible. This is the command I use. ansible my-host -i hosts.ini -m setup | grep ansible_os_family This is what my host file looks like. [my-host] myhostvm.com ansible_ssh_pass=mypw…
0
votes
1 answer

Error trying to create a new vm in ansible

I just started learning Ansible. It has been a pain so far. I have this code to create a new vm. I followed this tutorial. --- - hosts: localhost connection: local tasks: - vsphere_guest: vcenter_hostname:1.1.1.12 …
0
votes
1 answer

What is the Ansible policy for defining variables and constants in the vars, defaults or tasks directory?

I have read multiple documents including this one and checked multiple ansible roles on GitHub, but it is unclear to me when to define a variable and when one is defined where to put it, i.e. in the defaults, tasks or vars directory. I would like to…
030
  • 5,901
  • 13
  • 68
  • 110
0
votes
1 answer

Issue with Ansible wait_for module - how to reliably check if the VM is up and running?

I am trying to develop a simple playbook (which would later be used in larger ones) to check if Windows VMs in the inventory are up and running. I use Ansible Tower (free version) to manage the dynamic VMware inventory containing Windows VMs. These…
Chethan S.
  • 103
  • 1
  • 11
0
votes
1 answer

create a user and associate with existing pem file

I have an ec2 instance on which i am running ansible.I want to create a user with a playbook, but without a password and the user must be using existing pem file for authentication and must be able to login to instance that file.Tricky part here is…
chandra
  • 103
  • 1
0
votes
0 answers

Best practice/way to manage Elasticsearch cluster nodes in EC2 cloud with Ansible

I have to deploy cluster for production environment in EC2 cloud and want to be able to: 1. Remove/Add nodes from/to cluster 2. Assign roles to nodes (dedicated master node, data node, and client node) What are best way to manage it: - use…
0
votes
1 answer

I am trying to use vars_prompt but when i run the playbook it directly gives me prompt and ask for the value, it doesn't checks in inventory file

What I want is set the priority of variables. I am passing the variable from inventory file and if the variable is not defined in inventory file then it should ask for user prompt. I am trying to use vars_prompt but when i run the playbook it…
Huzefa
  • 65
  • 4
  • 13