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
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
---
- name: Group hosts by package manager
  hosts:
    - all
    - all:!localhost
  tasks:
    - name: Group hosts by package manager
      group_by: