1
vote
Ansible Syntax Issue combining Looping over list items with an Inline Conditional Clause
Put the services into a dictionary. For example,
services:
haproxy: [docker, haproxy, keepalived]
default: []
Given the inventory for testing
shell> cat hosts
localhost server_role=...
1
vote
Using Ansible, how can I convert a string to an integer to pass as the uid parameter to the user builtin?
You don't have to run the commands. Ansible setup provides you with the variables
ansible_user_id
ansible_user_uid
Use them
- block:
- setup:
gather_subset: user
- ...
1
vote
Ansible variable register in two tasks either one or the other
Multiple tasks branching on slight variations is annoying to write in Ansible, and runs slowly due to task overhead. Sometimes this can be collapsed into one script with variables. Here's my quick ...
1
vote
Accepted
How to troubleshoot API requests sent by Ansible module?
After many tests and investigations, just found entity.py in nutanix.ncp collection files. It was the file that is responsible of msg "Failed to convert API response to json"
One function ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
ansible × 1769ansible-playbook × 433
linux × 134
ssh × 104
ansible-tower × 58
amazon-web-services × 57
ubuntu × 55
python × 51
automation × 48
configuration-management × 45
vagrant × 43
amazon-ec2 × 37
yaml × 36
docker × 33
windows × 30
deployment × 29
centos × 27
jinja × 25
jenkins × 23
ansible-galaxy × 22
sudo × 21
ssh-keys × 21
jinja2 × 21
networking × 20
redhat × 20