mirror of
https://github.com/thegeeklab/ansible-doctor.git
synced 2024-11-22 12:50:43 +00:00
fix author overwrite and template
This commit is contained in:
parent
c8a9bfc325
commit
2d938b6cb7
@ -54,11 +54,12 @@ class Parser:
|
|||||||
|
|
||||||
if data.get("dependencies") is not None:
|
if data.get("dependencies") is not None:
|
||||||
self._data["meta"]["dependencies"] = {"value": data.get("dependencies")}
|
self._data["meta"]["dependencies"] = {"value": data.get("dependencies")}
|
||||||
|
|
||||||
self._data["meta"]["name"] = {"value": os.path.basename(self.config.role_dir)}
|
self._data["meta"]["name"] = {"value": os.path.basename(self.config.role_dir)}
|
||||||
except (ruamel.yaml.composer.ComposerError, ruamel.yaml.scanner.ScannerError) as e:
|
except (ruamel.yaml.composer.ComposerError, ruamel.yaml.scanner.ScannerError) as e:
|
||||||
message = "{} {}".format(e.context, e.problem)
|
message = "{} {}".format(e.context, e.problem)
|
||||||
self.log.sysexit_with_message("Unable to read yaml file {}\n{}".format(rfile, message))
|
self.log.sysexit_with_message("Unable to read yaml file {}\n{}".format(rfile, message))
|
||||||
|
print(self._data["meta"])
|
||||||
def _parse_task_tags(self):
|
def _parse_task_tags(self):
|
||||||
for rfile in self._files_registry.get_files():
|
for rfile in self._files_registry.get_files():
|
||||||
if any(fnmatch.fnmatch(rfile, "*/tasks/*." + ext) for ext in YAML_EXTENSIONS):
|
if any(fnmatch.fnmatch(rfile, "*/tasks/*." + ext) for ext in YAML_EXTENSIONS):
|
||||||
@ -83,6 +84,7 @@ class Parser:
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
anyconfig.merge(self._data, tags, ac_merge=anyconfig.MS_DICTS)
|
anyconfig.merge(self._data, tags, ac_merge=anyconfig.MS_DICTS)
|
||||||
|
print(self._data)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
self.log.sysexit_with_message("Unable to merge annotation values:\n{}".format(e))
|
self.log.sysexit_with_message("Unable to merge annotation values:\n{}".format(e))
|
||||||
|
|
||||||
|
@ -19,6 +19,6 @@ None.
|
|||||||
|
|
||||||
## Author
|
## Author
|
||||||
|
|
||||||
{{ meta.author.value }}
|
{{ meta.author.value | save_join(" ") }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user