mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-10 06:34:16 +00:00
silence ansible errors about implicit localhost
This commit is contained in:
parent
fab80632b7
commit
8d69469887
1 changed files with 4 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
|||
import os
|
||||
from ansible_runner import Runner, RunnerConfig
|
||||
from benedict import benedict
|
||||
from rich.pretty import pprint
|
||||
|
@ -8,6 +9,9 @@ GLOBAL_CACHE = {}
|
|||
IGNORED_VARS = ('OUTPUT', 'STDOUT', 'STDERR', 'RC', 'CMD')
|
||||
# IGNORED_VARS = ()
|
||||
|
||||
os.environ['ANSIBLE_INVENTORY_UNPARSED_WARNING'] = 'False'
|
||||
os.environ['ANSIBLE_LOCALHOST_WARNING'] = 'False'
|
||||
|
||||
def run_playbook(name, extravars=None, getvars=IGNORED_VARS):
|
||||
_discarded = [GLOBAL_CACHE.pop(key) for key in IGNORED_VARS if key in GLOBAL_CACHE]
|
||||
rc = RunnerConfig(
|
||||
|
|
Loading…
Reference in a new issue