mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
give more matching options for ansible-pull
This commit is contained in:
parent
e46b1e8d2b
commit
9f29e39dea
1 changed files with 4 additions and 1 deletions
|
@ -18,6 +18,7 @@
|
||||||
########################################################
|
########################################################
|
||||||
import datetime
|
import datetime
|
||||||
import os
|
import os
|
||||||
|
import platform
|
||||||
import random
|
import random
|
||||||
import shutil
|
import shutil
|
||||||
import socket
|
import socket
|
||||||
|
@ -107,7 +108,9 @@ class PullCLI(CLI):
|
||||||
|
|
||||||
# Build Checkout command
|
# Build Checkout command
|
||||||
# Now construct the ansible command
|
# Now construct the ansible command
|
||||||
limit_opts = 'localhost:%s:127.0.0.1' % socket.getfqdn()
|
node = platform.node()
|
||||||
|
host = socket.getfqdn()
|
||||||
|
limit_opts = 'localhost:%s:127.0.0.1' % ':'.join(set([host, node, host.split('.')[0], node.split('.')[0]]))
|
||||||
base_opts = '-c local "%s"' % limit_opts
|
base_opts = '-c local "%s"' % limit_opts
|
||||||
if self.options.verbosity > 0:
|
if self.options.verbosity > 0:
|
||||||
base_opts += ' -%s' % ''.join([ "v" for x in range(0, self.options.verbosity) ])
|
base_opts += ' -%s' % ''.join([ "v" for x in range(0, self.options.verbosity) ])
|
||||||
|
|
Loading…
Reference in a new issue