fixed up jinja2 templating and documentation

This commit is contained in:
Seth Foster
2021-06-07 14:00:43 -04:00
parent f06485feca
commit 199b4b6b47
6 changed files with 36 additions and 23 deletions

View File

@@ -22,12 +22,12 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = '''
---
module: tower_{{ singular_item_type }}
module: {{ singular_item_type }}
author: "John Westcott IV (@john-westcott-iv)"
version_added: "4.0.0"
short_description: create, update, or destroy Ansible Tower {{ human_readable }}.
short_description: create, update, or destroy Automation Platform Controller {{ human_readable }}.
description:
- Create, update, or destroy Ansible Tower {{ human_readable }}. See
- Create, update, or destroy Automation Platform Controller {{ human_readable }}. See
U(https://www.ansible.com/tower) for an overview.
options:
{% for option in item['json']['actions']['POST'] %}
@@ -37,12 +37,12 @@ options:
{% if 'help_text' in item['json']['actions']['POST'][option] %}
- {{ item['json']['actions']['POST'][option]['help_text'] }}
{% else %}
- NO DESCRIPTION GIVEN IN THE TOWER API
- NO DESCRIPTION GIVEN IN THE API
{% endif %}
required: {{ item['json']['actions']['POST'][option]['required'] }}
type: {{ type_map[ item['json']['actions']['POST'][option]['type'] ] }}
{% if 'default' in item['json']['actions']['POST'][option] %}
{# for tower_job_template/extra vars, its type is dict but its default is '', so we want to make that {} #}
{# for job_template/extra vars, its type is dict but its default is '', so we want to make that {} #}
{% if item['json']['actions']['POST'][option]['default'] == '' and type_map[ item['json']['actions']['POST'][option]['type'] ] == 'dict' %}
default: {}
{% else %}
@@ -82,9 +82,9 @@ options:
choices: ["present", "absent"]
default: "present"
type: str
tower_oauthtoken:
controller_oauthtoken:
description:
- The Tower OAuth token to use.
- The OAuth token to use.
required: False
type: str
extends_documentation_fragment: awx.awx.auth

View File

@@ -76,11 +76,13 @@ Notable releases of the `{{ collection_namespace }}.{{ collection_package }}` co
- 0.0.1-devel is the version you should see if installing from source, which is intended for development and expected to be unstable.
{% else %}
- 3.7.0 initial release
- 4.0.0 ansible.tower renamed to ansible.controller
- tower_ prefix is dropped from the module names, e.g. tower_inventory becomes inventory
{% endif %}
The following notes are changes that may require changes to playbooks:
- The module tower_notification was renamed tower_notification_template. In ansible >= 2.10 there is a seemless redirect. Ansible 2.9 does not respect the redirect.
- The module tower_notification was renamed tower_notification_template. In ansible >= 2.10 there is a seamless redirect. Ansible 2.9 does not respect the redirect.
- When a project is created, it will wait for the update/sync to finish by default; this can be turned off with the `wait` parameter, if desired.
- Creating a "scan" type job template is no longer supported.
- Specifying a custom certificate via the `TOWER_CERTIFICATE` environment variable no longer works.