File: module_utils_vvvvv.yml

package info (click to toggle)
ansible-core 2.19.0~beta6-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 32,628 kB
  • sloc: python: 180,313; cs: 4,929; sh: 4,601; xml: 34; makefile: 21
file content (29 lines) | stat: -rw-r--r-- 1,511 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
- hosts: testhost
  gather_facts: no
  tasks:
  - name: Use a specially crafted module to see if things were imported correctly
    test:

  # Invocation usually is output with 3vs or more, our callback plugin displays it anyway
  - name: Check no_log invocation results
    command: ansible-playbook -i {{ inventory_file }} module_utils_test_no_log.yml
    delegate_to: localhost
    environment:
      ANSIBLE_CALLBACK_PLUGINS: callback
      ANSIBLE_STDOUT_CALLBACK: pure_json
    register: no_log_invocation

  - set_fact:
      no_log_invocation: '{{ no_log_invocation.stdout | trim | from_json }}'

  - name: check no log values from fallback or default are masked
    assert:
      that:
      - no_log_invocation.invocation.module_args.default_pass == 'VALUE_SPECIFIED_IN_NO_LOG_PARAMETER'
      - no_log_invocation.invocation.module_args.explicit_pass == 'VALUE_SPECIFIED_IN_NO_LOG_PARAMETER'
      - no_log_invocation.invocation.module_args.fallback_pass == 'VALUE_SPECIFIED_IN_NO_LOG_PARAMETER'
      - no_log_invocation.invocation.module_args.normal == 'plaintext'
      - no_log_invocation.invocation.module_args.suboption.default_sub_pass == 'VALUE_SPECIFIED_IN_NO_LOG_PARAMETER'
      - no_log_invocation.invocation.module_args.suboption.explicit_sub_pass == 'VALUE_SPECIFIED_IN_NO_LOG_PARAMETER'
      - no_log_invocation.invocation.module_args.suboption.fallback_sub_pass == 'VALUE_SPECIFIED_IN_NO_LOG_PARAMETER'
      - no_log_invocation.invocation.module_args.suboption.normal == 'plaintext'