various sanity fixes

This commit is contained in:
Seth Foster
2021-06-02 12:44:16 -04:00
parent b26e33ca34
commit 157adb828e
6 changed files with 15 additions and 15 deletions

View File

@@ -10,7 +10,7 @@ DOCUMENTATION = """
short_description: Generate an rrule string which can be used for Schedules short_description: Generate an rrule string which can be used for Schedules
requirements: requirements:
- pytz - pytz
- python.dateutil >= 2.7.0 - python-dateutil >= 2.7.0
description: description:
- Returns a string based on criteria which represents an rrule - Returns a string based on criteria which represents an rrule
options: options:
@@ -131,12 +131,13 @@ class LookupModule(LookupBase):
} }
# plugin constructor # plugin constructor
def __init__(self): def __init__(self, *args, **kwargs):
if self.LIBRARY_IMPORT_ERROR: if LIBRARY_IMPORT_ERROR:
raise_from( raise_from(
AnsibleError('{0}'.format(LIBRARY_IMPORT_ERROR)), AnsibleError('{0}'.format(LIBRARY_IMPORT_ERROR)),
LIBRARY_IMPORT_ERROR LIBRARY_IMPORT_ERROR
) )
super().__init__(*args, *kwargs)
@staticmethod @staticmethod
def parse_date_time(date_string): def parse_date_time(date_string):

View File

@@ -120,7 +120,6 @@ options:
- Should use authorize for net type. - Should use authorize for net type.
- Deprecated, please use inputs - Deprecated, please use inputs
type: bool type: bool
default: 'no'
authorize_password: authorize_password:
description: description:
- Password for net credentials that require authorize. - Password for net credentials that require authorize.
@@ -360,7 +359,7 @@ def main():
project=dict(), project=dict(),
ssh_key_data=dict(no_log=True), ssh_key_data=dict(no_log=True),
ssh_key_unlock=dict(no_log=True), ssh_key_unlock=dict(no_log=True),
authorize=dict(type='bool', default=False), authorize=dict(type='bool'),
authorize_password=dict(no_log=True), authorize_password=dict(no_log=True),
client=dict(), client=dict(),
security_token=dict(no_log=True), security_token=dict(no_log=True),
@@ -399,12 +398,12 @@ def main():
for legacy_input in OLD_INPUT_NAMES: for legacy_input in OLD_INPUT_NAMES:
if module.params.get(legacy_input) is not None: if module.params.get(legacy_input) is not None:
module.deprecate( module.deprecate(
collection_name=DOCUMENTATION.module, collection_name="awx.awx",
msg='{0} parameter has been deprecated, please use inputs instead'.format(legacy_input), msg='{0} parameter has been deprecated, please use inputs instead'.format(legacy_input),
version="4.0.0") version="4.0.0")
if kind: if kind:
module.deprecate( module.deprecate(
collection_name=DOCUMENTATION.module, collection_name="awx.awx",
msg='The kind parameter has been deprecated, please use credential_type instead', msg='The kind parameter has been deprecated, please use credential_type instead',
version="4.0.0") version="4.0.0")

View File

@@ -132,9 +132,9 @@ def main():
max_interval = 30 max_interval = 30
interval = abs((min_interval + max_interval) / 2) interval = abs((min_interval + max_interval) / 2)
module.deprecate( module.deprecate(
collection_name=DOCUMENTATION.module, collection_name="awx.awx",
msg="Min and max interval have been deprecated, please use interval instead; interval will be set to {0}".format(interval), msg="Min and max interval have been deprecated, please use interval instead; interval will be set to {0}".format(interval),
version="ansible.tower:4.0.0", version="4.0.0",
) )
# Attempt to look up job based on the provided id # Attempt to look up job based on the provided id

View File

@@ -401,7 +401,7 @@ def main():
for legacy_input in OLD_INPUT_NAMES: for legacy_input in OLD_INPUT_NAMES:
if module.params.get(legacy_input) is not None: if module.params.get(legacy_input) is not None:
module.deprecate( module.deprecate(
collection_name=DOCUMENTATION.module, collection_name="awx.awx",
msg='{0} parameter has been deprecated, please use notification_configuration instead'.format(legacy_input), msg='{0} parameter has been deprecated, please use notification_configuration instead'.format(legacy_input),
version="4.0.0" version="4.0.0"
) )

View File

@@ -136,7 +136,7 @@ def main():
description=dict(), description=dict(),
application=dict(), application=dict(),
scope=dict(choices=['read', 'write'], default='write'), scope=dict(choices=['read', 'write'], default='write'),
existing_token=dict(type='dict', no_log=True), existing_token=dict(type='dict', no_log=False),
existing_token_id=dict(), existing_token_id=dict(),
state=dict(choices=['present', 'absent'], default='present'), state=dict(choices=['present', 'absent'], default='present'),
) )

View File

@@ -63,19 +63,19 @@
- name: Validate our token works by token - name: Validate our token works by token
job_list: job_list:
oauthtoken: "{{ tower_token.token }}" controller_oauthtoken: "{{ tower_token.token }}"
register: job_list register: job_list
- name: Validate our token works by object - name: Validate our token works by object
job_list: job_list:
oauthtoken: "{{ tower_token }}" controller_oauthtoken: "{{ tower_token }}"
register: job_list register: job_list
always: always:
- name: Delete our Token with our own token - name: Delete our Token with our own token
token: token:
existing_token: "{{ tower_token }}" existing_token: "{{ tower_token }}"
oauthtoken: "{{ tower_token }}" controller_oauthtoken: "{{ tower_token }}"
state: absent state: absent
when: tower_token is defined when: tower_token is defined
register: results register: results
@@ -100,7 +100,7 @@
- name: Delete the second Token with our own token - name: Delete the second Token with our own token
token: token:
existing_token_id: "{{ tower_token['id'] }}" existing_token_id: "{{ tower_token['id'] }}"
oauthtoken: "{{ tower_token }}" controller_oauthtoken: "{{ tower_token }}"
state: absent state: absent
when: tower_token is defined when: tower_token is defined
register: results register: results