modules: fix examples to use FQCN for builtin plugins (#661)

This commit is contained in:
Andrew Klychkov 2020-07-16 14:42:12 +03:00 committed by GitHub
commit 4c4a6ab27c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 36 additions and 36 deletions

View file

@ -189,7 +189,7 @@ EXAMPLES = '''
- ansible.builtin.debug:
var: output
- assert:
- ansible.builtin.assert:
that: "not output.changed "
- name: Stop all services
@ -202,7 +202,7 @@ EXAMPLES = '''
- ansible.builtin.debug:
var: output
- assert:
- ansible.builtin.assert:
that:
- "not web.flask_web_1.state.running"
- "not db.flask_db_1.state.running"
@ -217,7 +217,7 @@ EXAMPLES = '''
- ansible.builtin.debug:
var: output
- assert:
- ansible.builtin.assert:
that:
- "web.flask_web_1.state.running"
- "db.flask_db_1.state.running"
@ -264,7 +264,7 @@ EXAMPLES = '''
- ansible.builtin.debug:
var: output
- assert:
- ansible.builtin.assert:
that:
- "web.flask_web_1.state.running"
- "db.flask_db_1.state.running"
@ -296,7 +296,7 @@ EXAMPLES = '''
- ansible.builtin.debug:
var: output
- assert:
- ansible.builtin.assert:
that:
- "web.flask_web_1.state.running"
- "db.flask_db_1.state.running"

View file

@ -62,7 +62,7 @@ EXAMPLES = '''
register: result
- name: Make sure that both images pacur/centos-7 and sinatra exist locally
assert:
ansible.builtin.assert:
that:
- result.images | length == 2
'''

View file

@ -242,7 +242,7 @@ EXAMPLES = '''
with_items: "{{ gce.instance_data }}"
- name: Wait for SSH for instances
wait_for:
ansible.builtin.wait_for:
delay: 1
host: "{{ item.public_ip }}"
port: 22

View file

@ -327,7 +327,7 @@ EXAMPLES = '''
register: vm
- name: Wait for SSH to come up
wait_for_connection:
ansible.builtin.wait_for_connection:
delegate_to: '{{ vm.instances[0].networks[0].ip }}'
- name: Terminate VMs by ids

View file

@ -208,7 +208,7 @@ EXAMPLES = '''
register: newhosts
- name: Wait for ssh
wait_for:
ansible.builtin.wait_for:
delay: 1
host: "{{ item.public_ipv4 }}"
port: 22

View file

@ -41,7 +41,7 @@ EXAMPLES = '''
name: "{{ inventory_hostname }}"
region: DFW
- name: Map some facts
set_fact:
ansible.builtin.set_fact:
ansible_ssh_host: "{{ rax_accessipv4 }}"
'''

View file

@ -139,7 +139,7 @@ EXAMPLES = r'''
# Pass list and string vars as positional_args
- name: Set vars
set_fact:
ansible.builtin.set_fact:
my_list:
- 1
- 2

View file

@ -67,7 +67,7 @@ EXAMPLES = '''
# Examples to display the value of all or a single iDRAC attribute
- name: Store iDRAC attributes as a fact variable
set_fact:
ansible.builtin.set_fact:
idrac_attributes: "{{ result.redfish_facts.entries | selectattr('Id', 'defined') | selectattr('Id', 'equalto', 'iDRACAttributes') | list | first }}"
- name: Display all iDRAC attributes
@ -80,7 +80,7 @@ EXAMPLES = '''
# Examples to display the value of all or a single LifecycleController attribute
- name: Store LifecycleController attributes as a fact variable
set_fact:
ansible.builtin.set_fact:
lc_attributes: "{{ result.redfish_facts.entries | selectattr('Id', 'defined') | selectattr('Id', 'equalto', 'LCAttributes') | list | first }}"
- name: Display LifecycleController attributes
@ -93,7 +93,7 @@ EXAMPLES = '''
# Examples to display the value of all or a single System attribute
- name: Store System attributes as a fact variable
set_fact:
ansible.builtin.set_fact:
system_attributes: "{{ result.redfish_facts.entries | selectattr('Id', 'defined') | selectattr('Id', 'equalto', 'SystemAttributes') | list | first }}"
- name: Display System attributes

View file

@ -86,7 +86,7 @@ EXAMPLES = '''
delegate_to: myloadbalancernode
- name: Step 2
wait_for:
ansible.builtin.wait_for:
host: '{{ member.host }}'
port: '{{ member.port }}'
state: drained

View file

@ -188,17 +188,17 @@ EXAMPLES = '''
with_dict: "{{ my_jenkins_plugins }}"
- name: Initiate the fact
set_fact:
ansible.builtin.set_fact:
jenkins_restart_required: no
- name: Check if restart is required by any of the versioned plugins
set_fact:
ansible.builtin.set_fact:
jenkins_restart_required: yes
when: item.changed
with_items: "{{ my_jenkins_plugin_versioned.results }}"
- name: Check if restart is required by any of the unversioned plugins
set_fact:
ansible.builtin.set_fact:
jenkins_restart_required: yes
when: item.changed
with_items: "{{ my_jenkins_plugin_unversioned.results }}"
@ -224,7 +224,7 @@ EXAMPLES = '''
when: jenkins_restart_required
- name: Reset the fact
set_fact:
ansible.builtin.set_fact:
jenkins_restart_required: no
when: jenkins_restart_required

View file

@ -65,7 +65,7 @@ EXAMPLES = '''
password: admin
- name: Setting master using a variable to hold a more complicate script
set_fact:
ansible.builtin.set_fact:
setmaster_mode: |
import jenkins.model.*
instance = Jenkins.getInstance()