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: ...@@ -14,6 +14,10 @@ all:
ansible_host: ea6350.shore.co.il ansible_host: ea6350.shore.co.il
host01: host01:
ansible_host: host01.shore.co.il ansible_host: host01.shore.co.il
localhost:
ansible_host: localhost
ansible_become: false
ansible_connection: local
vars: vars:
# Force usage of Python3. # Force usage of Python3.
ansible_become: true ansible_become: true
......
--- ---
- name: Group hosts by package manager - name: Group hosts by package manager
hosts: hosts:
- all - all:!localhost
tasks: tasks:
- name: Group hosts by package manager - name: Group hosts by package manager
group_by: group_by:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment