mirror of
https://github.com/ansible/awx.git
synced 2026-01-29 15:24:42 -03:30
various sanity fixes
This commit is contained in:
parent
b26e33ca34
commit
157adb828e
@ -10,7 +10,7 @@ DOCUMENTATION = """
|
||||
short_description: Generate an rrule string which can be used for Schedules
|
||||
requirements:
|
||||
- pytz
|
||||
- python.dateutil >= 2.7.0
|
||||
- python-dateutil >= 2.7.0
|
||||
description:
|
||||
- Returns a string based on criteria which represents an rrule
|
||||
options:
|
||||
@ -131,12 +131,13 @@ class LookupModule(LookupBase):
|
||||
}
|
||||
|
||||
# plugin constructor
|
||||
def __init__(self):
|
||||
if self.LIBRARY_IMPORT_ERROR:
|
||||
def __init__(self, *args, **kwargs):
|
||||
if LIBRARY_IMPORT_ERROR:
|
||||
raise_from(
|
||||
AnsibleError('{0}'.format(LIBRARY_IMPORT_ERROR)),
|
||||
LIBRARY_IMPORT_ERROR
|
||||
)
|
||||
super().__init__(*args, *kwargs)
|
||||
|
||||
@staticmethod
|
||||
def parse_date_time(date_string):
|
||||
|
||||
@ -120,7 +120,6 @@ options:
|
||||
- Should use authorize for net type.
|
||||
- Deprecated, please use inputs
|
||||
type: bool
|
||||
default: 'no'
|
||||
authorize_password:
|
||||
description:
|
||||
- Password for net credentials that require authorize.
|
||||
@ -360,7 +359,7 @@ def main():
|
||||
project=dict(),
|
||||
ssh_key_data=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),
|
||||
client=dict(),
|
||||
security_token=dict(no_log=True),
|
||||
@ -399,12 +398,12 @@ def main():
|
||||
for legacy_input in OLD_INPUT_NAMES:
|
||||
if module.params.get(legacy_input) is not None:
|
||||
module.deprecate(
|
||||
collection_name=DOCUMENTATION.module,
|
||||
collection_name="awx.awx",
|
||||
msg='{0} parameter has been deprecated, please use inputs instead'.format(legacy_input),
|
||||
version="4.0.0")
|
||||
if kind:
|
||||
module.deprecate(
|
||||
collection_name=DOCUMENTATION.module,
|
||||
collection_name="awx.awx",
|
||||
msg='The kind parameter has been deprecated, please use credential_type instead',
|
||||
version="4.0.0")
|
||||
|
||||
|
||||
@ -132,9 +132,9 @@ def main():
|
||||
max_interval = 30
|
||||
interval = abs((min_interval + max_interval) / 2)
|
||||
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),
|
||||
version="ansible.tower:4.0.0",
|
||||
version="4.0.0",
|
||||
)
|
||||
|
||||
# Attempt to look up job based on the provided id
|
||||
|
||||
@ -401,7 +401,7 @@ def main():
|
||||
for legacy_input in OLD_INPUT_NAMES:
|
||||
if module.params.get(legacy_input) is not None:
|
||||
module.deprecate(
|
||||
collection_name=DOCUMENTATION.module,
|
||||
collection_name="awx.awx",
|
||||
msg='{0} parameter has been deprecated, please use notification_configuration instead'.format(legacy_input),
|
||||
version="4.0.0"
|
||||
)
|
||||
|
||||
@ -136,7 +136,7 @@ def main():
|
||||
description=dict(),
|
||||
application=dict(),
|
||||
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(),
|
||||
state=dict(choices=['present', 'absent'], default='present'),
|
||||
)
|
||||
|
||||
@ -63,19 +63,19 @@
|
||||
|
||||
- name: Validate our token works by token
|
||||
job_list:
|
||||
oauthtoken: "{{ tower_token.token }}"
|
||||
controller_oauthtoken: "{{ tower_token.token }}"
|
||||
register: job_list
|
||||
|
||||
- name: Validate our token works by object
|
||||
job_list:
|
||||
oauthtoken: "{{ tower_token }}"
|
||||
controller_oauthtoken: "{{ tower_token }}"
|
||||
register: job_list
|
||||
|
||||
always:
|
||||
- name: Delete our Token with our own token
|
||||
token:
|
||||
existing_token: "{{ tower_token }}"
|
||||
oauthtoken: "{{ tower_token }}"
|
||||
controller_oauthtoken: "{{ tower_token }}"
|
||||
state: absent
|
||||
when: tower_token is defined
|
||||
register: results
|
||||
@ -100,7 +100,7 @@
|
||||
- name: Delete the second Token with our own token
|
||||
token:
|
||||
existing_token_id: "{{ tower_token['id'] }}"
|
||||
oauthtoken: "{{ tower_token }}"
|
||||
controller_oauthtoken: "{{ tower_token }}"
|
||||
state: absent
|
||||
when: tower_token is defined
|
||||
register: results
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user