File: verbosity.yml

package info (click to toggle)
python-mitogen 0.3.36-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,708 kB
  • sloc: python: 24,457; sh: 198; makefile: 74; perl: 19; ansic: 18
file content (41 lines) | stat: -rw-r--r-- 1,246 bytes parent folder | download
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
30
31
32
33
34
35
36
37
38
39
40
41
# Ansible >= 12 (ansible-core >= 2.19) adds SSH connection `verbosity` property.
# Ansible <= 11 (ansible-core <= 2.18) applies ANSIBLE_VERBOSITY -> ssh.

- name: integration/ssh/verbosity.yml
  hosts: test-targets
  gather_facts: false
  tasks:
    - meta: end_play
      when:
        - ansible_version_major_minor is version('2.19', '<', strict=True)

    - name: Exercise ssh verbosity
      connection: local
      environment:
        ANSIBLE_CALLBACK_RESULT_FORMAT: json
        ANSIBLE_LOAD_CALLBACK_PLUGINS: "false"
        ANSIBLE_SSH_VERBOSITY: 3
        ANSIBLE_STRATEGY: "{{ lookup('env', 'ANSIBLE_STRATEGY') | mandatory }}"
        ANSIBLE_VERBOSITY: 3
      vars:
        ansible_python_interpreter: "{{ ansible_playbook_python }}"
      command:
        cmd:
          ansible
          {% for inv in ansible_inventory_sources %}
          -i "{{ inv }}"
          {% endfor %}
          "{{ inventory_hostname }}"
          -m ping
        chdir: ../..
      register: out
      changed_when: false
      check_mode: false

    - name: Verify ssh -vvv output is included
      assert:
        that:
          - >-
            out.stdout is search('debug1: Reading configuration data')
        fail_msg: |
          out={{ out }}