Skip to content
Snippets Groups Projects
Commit 548e2002 authored by nimrod's avatar nimrod
Browse files

Don't ask password for localhost.

- Add localhost to the inventory, set become and connection options.
- Exclude localhost from playbooks that have all as the hosts list.
parent 9b89c370
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,10 @@ all:
ansible_host: ea6350.shore.co.il
host01:
ansible_host: host01.shore.co.il
localhost:
ansible_host: localhost
ansible_become: false
ansible_connection: local
vars:
# Force usage of Python3.
ansible_become: true
......
---
- name: Group hosts by package manager
hosts:
- all
- all:!localhost
tasks:
- name: Group hosts by package manager
group_by:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment