Skip to main content

New answers tagged

1 vote

How to skip play in ansible-playbook?

For those looking for a way to skip a play in Ansible (e.g. troubleshooting the second or third play during development), my workaround is to temporarily change the hosts setting to an unused group ...
Matthew's user avatar
  • 111
0 votes

provided hosts list is empty, only localhost is available

You need to check for below possible issues : hosts.ini ensure the format is correct, it should be something like this: [demo] 192.168.1.100 ansible_ssh_port=22 ansible_ssh_user=root You are ...
RahulK's user avatar
  • 1
0 votes

Ansible Jinja2 evaluate string as template

The case you describe is not complete. Without the variable var defined you have to see the error message: 'var'' is undefined The below play - hosts: localhost vars: checks: - name: &...
Vladimir Botka's user avatar
0 votes

How could I make ansible connection parameters dependent on the controller host?

My current best bet is like this: ansible_connection: "{{ 'local' if lookup('pipe', 'hostname') == 'myclient1' else 'ssh' }}" That will use the local connection plugin on myclient1, and ssh ...
peterh's user avatar
  • 202

Top 50 recent answers are included