Skip to content

Instantly share code, notes, and snippets.

@mkrizek
Created July 26, 2019 16:02
Show Gist options
  • Save mkrizek/c3171008999842b99b022d46d2c4dc36 to your computer and use it in GitHub Desktop.
Save mkrizek/c3171008999842b99b022d46d2c4dc36 to your computer and use it in GitHub Desktop.
diff --git a/lib/ansible/executor/task_executor.py b/lib/ansible/executor/task_executor.py
index 5782c93c83..b887f6c8a8 100644
--- a/lib/ansible/executor/task_executor.py
+++ b/lib/ansible/executor/task_executor.py
@@ -420,6 +420,7 @@ class TaskExecutor:
}
if self._connection.become:
clear_plugins['become'] = self._connection.become._load_name
+ self._connection.become.prompt = ''
for plugin_type, plugin_name in iteritems(clear_plugins):
for var in C.config.get_plugin_vars(plugin_type, plugin_name):
@mkrizek
Copy link
Author

mkrizek commented Jul 26, 2019

- hosts: localhost  # implicit
  gather_facts: no
  tasks:
    - ping:
      become: yes
      become_user: "{{ item }}"
      loop:
        - root
        - mkrizek  # same as remote_user

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment