mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07:00
parent
44121352fe
commit
47738eb1dd
5 changed files with 131 additions and 151 deletions
|
@ -13,7 +13,7 @@ from ansible.playbook.task import Task
|
|||
template_file = 'playbooks_keywords.rst.j2'
|
||||
oblist = {}
|
||||
clist = []
|
||||
class_list = [ Play, Role, Block, Task ]
|
||||
class_list = [Play, Role, Block, Task]
|
||||
|
||||
p = optparse.OptionParser(
|
||||
version='%prog 1.0',
|
||||
|
@ -62,8 +62,8 @@ for aclass in class_list:
|
|||
|
||||
env = Environment(loader=FileSystemLoader(options.template_dir), trim_blocks=True,)
|
||||
template = env.get_template(template_file)
|
||||
outputname = options.output_dir + template_file.replace('.j2','')
|
||||
tempvars = { 'oblist': oblist, 'clist': clist }
|
||||
outputname = options.output_dir + template_file.replace('.j2', '')
|
||||
tempvars = {'oblist': oblist, 'clist': clist}
|
||||
|
||||
with open( outputname, 'w') as f:
|
||||
with open(outputname, 'w') as f:
|
||||
f.write(template.render(tempvars))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue