Hot answers tagged

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=...
Vladimir Botka's user avatar
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 - ...
Vladimir Botka's user avatar
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 ...
John Mahowald's user avatar
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 ...
motorbass's user avatar
  • 343

Only top scored, non community-wiki answers of a minimum length are eligible