mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
parent
8f18e6574e
commit
5a0f5f1254
1 changed files with 4 additions and 2 deletions
|
@ -421,9 +421,11 @@ class Inventory(object):
|
|||
|
||||
def _create_implicit_localhost(self, pattern):
|
||||
new_host = Host(pattern)
|
||||
new_host.set_variable("ansible_python_interpreter", sys.executable)
|
||||
new_host.address = "127.0.0.1"
|
||||
new_host.vars = self.get_host_vars(new_host)
|
||||
new_host.set_variable("ansible_connection", "local")
|
||||
new_host.address = '127.0.0.1'
|
||||
if "ansible_python_interpreter" not in new_host.vars:
|
||||
new_host.set_variable("ansible_python_interpreter", sys.executable)
|
||||
self.get_group("ungrouped").add_host(new_host)
|
||||
return new_host
|
||||
|
||||
|
|
Loading…
Reference in a new issue