Skip to content
Snippets Groups Projects
Commit f108f453 authored by jurgenhaas's avatar jurgenhaas
Browse files

Read hostvars only on hosts that run Ansible

parent 90d0f790
No related branches found
No related tags found
No related merge requests found
......@@ -26,19 +26,23 @@
- '{{ admins|default([]) }}'
- '{{ jailusers|default([]) }}'
- name: "Read available variable cache files"
shell: ls ~/.ansible/hostvars
become: no
register: variable_files
failed_when: false
changed_when: false
ignore_errors: true
tags: always
- include: more.yml
with_items: '{{ variable_files.stdout_lines|default([]) }}'
loop_control:
loop_var: inventory_name
- block:
- name: "Read available variable cache files"
shell: ls ~/.ansible/hostvars
become: no
register: variable_files
failed_when: false
changed_when: false
ignore_errors: true
tags: always
- include: more.yml
with_items: '{{ variable_files.stdout_lines|default([]) }}'
loop_control:
loop_var: inventory_name
when: lookup('pipe','hostname') == inventory_hostname
- name: 'Remember that this role had been run'
set_fact: role_commonconnect_completed=true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment