mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
applying indentation patch from skvidal
This commit is contained in:
@@ -4,9 +4,9 @@ import sys
|
||||
import os
|
||||
import jinja2
|
||||
try:
|
||||
import json
|
||||
import json
|
||||
except ImportError:
|
||||
import simplejson as json
|
||||
import simplejson as json
|
||||
|
||||
source = sys.argv[1]
|
||||
dest = sys.argv[2]
|
||||
@@ -45,7 +45,7 @@ source = file(source).read()
|
||||
changed = False
|
||||
md5sum = None
|
||||
if os.path.exists(dest):
|
||||
md5sum = os.popen("md5sum %s" % dest).read()
|
||||
md5sum = os.popen("md5sum %s" % dest).read()
|
||||
|
||||
# call Jinja2 here and save the new template file
|
||||
template = jinja2.Template(source)
|
||||
@@ -61,7 +61,7 @@ f.close()
|
||||
md5sum2 = os.popen("md5sum %s" % dest).read()
|
||||
|
||||
if md5sum != md5sum2:
|
||||
changed = True
|
||||
changed = True
|
||||
|
||||
# mission accomplished
|
||||
print json.dumps({
|
||||
|
||||
Reference in New Issue
Block a user