Second batch for _facts -> _info rename (#57020)

* Second batch of _facts -> _info.

* Forgot one reference.
This commit is contained in:
Felix Fontein 2019-06-10 13:04:07 +02:00 committed by GitHub
commit 039eb892ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 64 additions and 45 deletions

View file

@ -0,0 +1 @@
intersight_info.py

View file

@ -12,15 +12,16 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = r'''
---
module: intersight_facts
short_description: Gather facts about Intersight
module: intersight_info
short_description: Gather information about Intersight
description:
- Gathers facts about servers in L(Cisco Intersight,https://intersight.com).
- Gathers information about servers in L(Cisco Intersight,https://intersight.com).
- This module was called C(intersight_facts) before Ansible 2.9. The usage did not change.
extends_documentation_fragment: intersight
options:
server_names:
description:
- Server names to retrieve facts from.
- Server names to retrieve information from.
- An empty list will return all servers.
type: list
required: yes
@ -31,8 +32,8 @@ version_added: '2.8'
'''
EXAMPLES = r'''
- name: Get facts for all servers
intersight_facts:
- name: Get info for all servers
intersight_info:
api_private_key: ~/Downloads/SecretKey.txt
api_key_id: 64612d300d0982/64612d300d0b00/64612d300d3650
server_names:
@ -41,8 +42,8 @@ EXAMPLES = r'''
loop: "{{ intersight_servers }}"
when: intersight_servers is defined
- name: Get facts for servers by name
intersight_facts:
- name: Get info for servers by name
intersight_info:
api_private_key: ~/Downloads/SecretKey.txt
api_key_id: 64612d300d0982/64612d300d0b00/64612d300d3650
server_names:
@ -103,6 +104,8 @@ def main():
argument_spec,
supports_check_mode=True,
)
if module._name == 'intersight_facts':
module.deprecate("The 'intersight_facts' module has been renamed to 'intersight_info'", version='2.13')
intersight = IntersightModule(module)

View file

@ -20,7 +20,7 @@ short_description: Manages GitHub service hooks.
deprecated:
removed_in: "2.12"
why: Replaced by more granular modules
alternative: Use M(github_webhook) and M(github_webhook_facts) instead.
alternative: Use M(github_webhook) and M(github_webhook_info) instead.
description:
- Adds service hooks and removes service hooks that have an error status.
version_added: "1.4"

View file

@ -0,0 +1 @@
github_webhook_info.py

View file

@ -14,11 +14,12 @@ ANSIBLE_METADATA = {
DOCUMENTATION = '''
---
module: github_webhook_facts
module: github_webhook_info
short_description: Query information about GitHub webhooks
version_added: "2.8"
description:
- "Query information about GitHub webhooks"
- This module was called C(github_webhook_facts) before Ansible 2.9. The usage did not change.
requirements:
- "PyGithub >= 1.3.5"
options:
@ -52,14 +53,14 @@ author:
EXAMPLES = '''
- name: list hooks for a repository (password auth)
github_webhook_facts:
github_webhook_info:
repository: ansible/ansible
user: "{{ github_user }}"
password: "{{ github_password }}"
register: ansible_webhooks
- name: list hooks for a repository on GitHub Enterprise (token auth)
github_webhook_facts:
github_webhook_info:
repository: myorg/myrepo
user: "{{ github_user }}"
token: "{{ github_user_api_token }}"
@ -126,6 +127,8 @@ def main():
mutually_exclusive=(('password', 'token'), ),
required_one_of=(("password", "token"), ),
supports_check_mode=True)
if module._name == 'github_webhook_facts':
module.deprecate("The 'github_webhook_facts' module has been renamed to 'github_webhook_info'", version='2.13')
if not HAS_GITHUB:
module.fail_json(msg=missing_required_lib('PyGithub'),

View file

@ -0,0 +1 @@
jenkins_job_info.py

View file

@ -15,20 +15,21 @@ ANSIBLE_METADATA = {
DOCUMENTATION = '''
---
module: jenkins_job_facts
short_description: Get facts about Jenkins jobs
module: jenkins_job_info
short_description: Get information about Jenkins jobs
version_added: "2.5"
description:
- This module can be used to query the facts about which Jenkins jobs which already exists.
- This module can be used to query information about which Jenkins jobs which already exists.
- This module was called C(jenkins_job_info) before Ansible 2.9. The usage did not change.
requirements:
- "python-jenkins >= 0.4.12"
options:
name:
description:
- Exact name of the Jenkins job to fetch facts about.
- Exact name of the Jenkins job to fetch information about.
glob:
description:
- A shell glob of Jenkins job names to fetch facts about.
- A shell glob of Jenkins job names to fetch information about.
color:
description:
- Only fetch jobs with the given status color.
@ -60,60 +61,60 @@ author:
EXAMPLES = '''
# Get all Jenkins jobs using basic auth
- jenkins_job_facts:
- jenkins_job_info:
user: admin
password: hunter2
register: my_jenkins_job_facts
register: my_jenkins_job_info
# Get all Jenkins jobs using the token
- jenkins_job_facts:
- jenkins_job_info:
user: admin
token: abcdefghijklmnop
register: my_jenkins_job_facts
register: my_jenkins_job_info
# Get facts about a single job using basic auth
- jenkins_job_facts:
# Get info about a single job using basic auth
- jenkins_job_info:
name: some-job-name
user: admin
password: hunter2
register: my_jenkins_job_facts
register: my_jenkins_job_info
# Get facts about a single job in a folder using basic auth
- jenkins_job_facts:
# Get info about a single job in a folder using basic auth
- jenkins_job_info:
name: some-folder-name/some-job-name
user: admin
password: hunter2
register: my_jenkins_job_facts
register: my_jenkins_job_info
# Get facts about jobs matching a shell glob using basic auth
- jenkins_job_facts:
# Get info about jobs matching a shell glob using basic auth
- jenkins_job_info:
glob: some-job-*
user: admin
password: hunter2
register: my_jenkins_job_facts
register: my_jenkins_job_info
# Get facts about all failing jobs using basic auth
- jenkins_job_facts:
# Get info about all failing jobs using basic auth
- jenkins_job_info:
color: red
user: admin
password: hunter2
register: my_jenkins_job_facts
register: my_jenkins_job_info
# Get facts about passing jobs matching a shell glob using basic auth
- jenkins_job_facts:
# Get info about passing jobs matching a shell glob using basic auth
- jenkins_job_info:
name: some-job-*
color: blue
user: admin
password: hunter2
register: my_jenkins_job_facts
register: my_jenkins_job_info
- name: Get the facts from custom URL with token and validate_certs=False
jenkins_job_facts:
- name: Get the info from custom URL with token and validate_certs=False
jenkins_job_info:
user: admin
token: 126df5c60d66c66e3b75b11104a16a8a
url: https://jenkins.example.com
validate_certs: False
register: my_jenkins_job_facts
register: my_jenkins_job_info
'''
RETURN = '''
@ -237,6 +238,8 @@ def main():
],
supports_check_mode=True,
)
if module._name == 'jenkins_job_facts':
module.deprecate("The 'jenkins_job_facts' module has been renamed to 'jenkins_job_info'", version='2.13')
test_dependencies(module)
jobs = list()