Use connection: local when delegate_to: localhost (#6322)

This will avoid SSH connection on the local host
This commit is contained in:
bozzo
2020-06-25 17:14:38 +02:00
committed by GitHub
parent a6a6e843af
commit 276c450759
12 changed files with 19 additions and 0 deletions

View File

@@ -25,6 +25,7 @@
stat:
path: "{{ image_path_cached }}"
delegate_to: localhost
connection: local
delegate_facts: no
register: cache_image
changed_when: false

View File

@@ -25,6 +25,7 @@
state: directory
recurse: yes
delegate_to: localhost
connection: local
delegate_facts: false
run_once: true
become: false

View File

@@ -20,6 +20,7 @@
- name: prep_download | On localhost, check if passwordless root is possible
command: "true"
delegate_to: localhost
connection: local
run_once: true
register: test_become
changed_when: false
@@ -34,6 +35,7 @@
- name: prep_download | On localhost, check if user has access to docker without using sudo
shell: "{{ image_info_command_on_localhost }}"
delegate_to: localhost
connection: local
run_once: true
register: test_docker
changed_when: false
@@ -92,6 +94,7 @@
recurse: yes
mode: 0755
delegate_to: localhost
connection: local
delegate_facts: no
run_once: true
become: false