Subject: [ansible-project] playbook without hosts desribed

On 07.08.2019 18:55, Veera wrote:

No, hosts is a required attribute for a play.

You can always set hosts: all and use the --limit to only run on some hosts.

I don't understand what you mean by "for security reasons".

You can use a variable for hosts an set it with extra vars on the command line

- hosts: '{{ myvar }}'

ansible-playbook pb.yml -e myvar=all
Kai Stian Olstad