mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 19:20:22 -07:00
Annotate more files, fix missing imports messing with playbooks. Hey Tim, please test your stuff :)
This commit is contained in:
parent
238fffd6ef
commit
09a7119e74
7 changed files with 119 additions and 23 deletions
|
@ -20,6 +20,7 @@
|
|||
import ansible.runner
|
||||
import ansible.constants as C
|
||||
from ansible.utils import *
|
||||
from ansible.errors import *
|
||||
import yaml
|
||||
import shlex
|
||||
import os
|
||||
|
@ -87,6 +88,8 @@ class PlayBook(object):
|
|||
|
||||
def _get_vars(self, play, dirname):
|
||||
vars = play.get('vars', {})
|
||||
if type(vars) != dict:
|
||||
raise AnsibleError("'vars' section must contain only key/value pairs")
|
||||
vars_files = play.get('vars_files', [])
|
||||
for f in vars_files:
|
||||
path = path_dwim(dirname, f)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue