mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-22 02:11:26 -07:00
modules: fix examples to use FQCN for builtin modules (#648)
* modules: fix examples to use FQCN for builtin modules * fix * fix * fix * fix * fix * fix * fix
This commit is contained in:
parent
c034e8c04f
commit
c055340ecb
126 changed files with 290 additions and 286 deletions
|
@ -629,7 +629,7 @@ playbook.yml: >
|
|||
gather_facts: no
|
||||
tasks:
|
||||
- name: Default plugin output
|
||||
debug:
|
||||
ansible.builtin.debug:
|
||||
msg: default plugin output
|
||||
|
||||
- name: Override from play vars
|
||||
|
@ -687,11 +687,11 @@ playbook.yml: >
|
|||
|
||||
tasks:
|
||||
- name: Custom banner with default plugin result output
|
||||
debug:
|
||||
ansible.builtin.debug:
|
||||
msg: "default plugin output: result example"
|
||||
|
||||
- name: Override from task vars
|
||||
debug:
|
||||
ansible.builtin.debug:
|
||||
msg: "example {{ two }}"
|
||||
changed_when: true
|
||||
vars:
|
||||
|
@ -703,14 +703,14 @@ playbook.yml: >
|
|||
ansible_callback_diy_runner_on_ok_msg_color: "{{ 'yellow' if ansible_callback_diy.result.is_changed else 'bright green' }}"
|
||||
|
||||
- name: Suppress output
|
||||
debug:
|
||||
ansible.builtin.debug:
|
||||
msg: i should not be displayed
|
||||
vars:
|
||||
ansible_callback_diy_playbook_on_task_start_msg: ""
|
||||
ansible_callback_diy_runner_on_ok_msg: ""
|
||||
|
||||
- name: Using alias vars (see ansible.cfg)
|
||||
debug:
|
||||
ansible.builtin.debug:
|
||||
msg:
|
||||
when: False
|
||||
vars:
|
||||
|
@ -719,13 +719,13 @@ playbook.yml: >
|
|||
on_skipped_msg_color: white
|
||||
|
||||
- name: Just stdout
|
||||
command: echo some stdout
|
||||
ansible.builtin.command: echo some stdout
|
||||
vars:
|
||||
ansible_callback_diy_playbook_on_task_start_msg: "\n"
|
||||
ansible_callback_diy_runner_on_ok_msg: "{{ ansible_callback_diy.result.output.stdout }}\n"
|
||||
|
||||
- name: Multiline output
|
||||
debug:
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ multiline }}"
|
||||
vars:
|
||||
ansible_callback_diy_playbook_on_task_start_msg: "\nDIY output(via task vars): task example: {{ ansible_callback_diy.task.name }}"
|
||||
|
@ -738,7 +738,7 @@ playbook.yml: >
|
|||
ansible_callback_diy_playbook_on_task_start_msg_color: bright blue
|
||||
|
||||
- name: Indentation
|
||||
debug:
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ item.msg }}"
|
||||
with_items:
|
||||
- { indent: 1, msg: one., color: red }
|
||||
|
@ -751,14 +751,14 @@ playbook.yml: >
|
|||
ansible_callback_diy_runner_on_ok_msg_color: bright green
|
||||
|
||||
- name: Using lookup and template as file
|
||||
shell: "echo {% raw %}'output from {{ file_name }}'{% endraw %} > {{ file_name }}"
|
||||
ansible.builtin.shell: "echo {% raw %}'output from {{ file_name }}'{% endraw %} > {{ file_name }}"
|
||||
vars:
|
||||
ansible_callback_diy_playbook_on_task_start_msg: "\nDIY output(via task vars): task example: {{ ansible_callback_diy.task.name }}"
|
||||
file_name: diy_file_template_example
|
||||
ansible_callback_diy_runner_on_ok_msg: "{{ lookup('template', file_name) }}"
|
||||
|
||||
- name: 'Look at top level vars available to the "runner_on_ok" callback'
|
||||
debug:
|
||||
ansible.builtin.debug:
|
||||
msg: ''
|
||||
vars:
|
||||
ansible_callback_diy_playbook_on_task_start_msg: "\nDIY output(via task vars): task example: {{ ansible_callback_diy.task.name }}"
|
||||
|
@ -771,7 +771,7 @@ playbook.yml: >
|
|||
ansible_callback_diy_runner_on_ok_msg_color: white
|
||||
|
||||
- name: 'Look at event data available to the "runner_on_ok" callback'
|
||||
debug:
|
||||
ansible.builtin.debug:
|
||||
msg: ''
|
||||
vars:
|
||||
ansible_callback_diy_playbook_on_task_start_msg: "\nDIY output(via task vars): task example: {{ ansible_callback_diy.task.name }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue