Merge commit 'e334b50d9d5bc5174d1e07c83c6617db6406193e' into release-v0.3.8
commit
d0d39cccf2
@ -1,2 +1,3 @@
|
||||
---
|
||||
pkg_mgr_python_interpreter: python
|
||||
pkg_repos_overrides: []
|
||||
|
@ -1,2 +1,28 @@
|
||||
---
|
||||
pkg_mgr_python_interpreter: /usr/libexec/platform-python
|
||||
|
||||
pkg_repos_overrides:
|
||||
- dest: /etc/yum.repos.d/CentOS-Linux-AppStream.repo
|
||||
content: |
|
||||
[appstream]
|
||||
name=CentOS Linux $releasever - AppStream
|
||||
baseurl=http://vault.centos.org/$contentdir/$releasever/AppStream/$basearch/os/
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
|
||||
- dest: /etc/yum.repos.d/CentOS-Linux-BaseOS.repo
|
||||
content: |
|
||||
[baseos]
|
||||
name=CentOS Linux $releasever - BaseOS
|
||||
baseurl=http://vault.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
|
||||
- dest: /etc/yum.repos.d/CentOS-Linux-Extras.repo
|
||||
content: |
|
||||
[extras]
|
||||
name=CentOS Linux $releasever - Extras
|
||||
baseurl=http://vault.centos.org/$contentdir/$releasever/extras/$basearch/os/
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
|
||||
|
@ -0,0 +1,4 @@
|
||||
pkg_repos_overrides:
|
||||
- dest: /etc/apt/sources.list
|
||||
content: |
|
||||
deb http://archive.debian.org/debian stretch main contrib non-free
|
@ -0,0 +1,17 @@
|
||||
- name: Cleanup local file
|
||||
file:
|
||||
path: /tmp/{{ file_name }}
|
||||
state: absent
|
||||
delegate_to: localhost
|
||||
run_once: true
|
||||
tags:
|
||||
- cleanup_local
|
||||
- cleanup
|
||||
|
||||
- name: Cleanup target file
|
||||
file:
|
||||
path: /tmp/{{ file_name }}.out
|
||||
state: absent
|
||||
tags:
|
||||
- cleanup_target
|
||||
- cleanup
|
@ -0,0 +1,94 @@
|
||||
# Each case is followed by mitogen_via= case to test hostvars method.
|
||||
|
||||
- name: integration/transport_config/host_key_checking.yml
|
||||
hosts: tc-hkc-unset
|
||||
tasks:
|
||||
- include_tasks: ../_mitogen_only.yml
|
||||
- {mitogen_get_stack: {}, register: out}
|
||||
- assert:
|
||||
that:
|
||||
- out.result | length == 1
|
||||
- out.result[0].method == "ssh"
|
||||
- out.result[0].kwargs.check_host_keys == "ignore"
|
||||
fail_msg: out={{ out }}
|
||||
tags:
|
||||
- mitogen_only
|
||||
|
||||
- hosts: tc-hkc-unset
|
||||
vars:
|
||||
mitogen_via: tc-hkc-host-key-checking
|
||||
tasks:
|
||||
- include_tasks: ../_mitogen_only.yml
|
||||
- {mitogen_get_stack: {}, register: out}
|
||||
- assert:
|
||||
that:
|
||||
- out.result | length == 2
|
||||
- out.result[0].method == "ssh"
|
||||
- out.result[0].kwargs.check_host_keys == "enforce"
|
||||
- out.result[1].method == "ssh"
|
||||
- out.result[1].kwargs.check_host_keys == "ignore"
|
||||
fail_msg: out={{ out }}
|
||||
tags:
|
||||
- mitogen_only
|
||||
|
||||
|
||||
- hosts: tc-hkc-host-key-checking
|
||||
tasks:
|
||||
- include_tasks: ../_mitogen_only.yml
|
||||
- {mitogen_get_stack: {}, register: out}
|
||||
- assert:
|
||||
that:
|
||||
- out.result | length == 1
|
||||
- out.result[0].method == "ssh"
|
||||
- out.result[0].kwargs.check_host_keys == "enforce"
|
||||
fail_msg: out={{ out }}
|
||||
tags:
|
||||
- mitogen_only
|
||||
|
||||
- hosts: tc-hkc-host-key-checking
|
||||
vars:
|
||||
mitogen_via: tc-hkc-unset
|
||||
tasks:
|
||||
- include_tasks: ../_mitogen_only.yml
|
||||
- {mitogen_get_stack: {}, register: out}
|
||||
- assert:
|
||||
that:
|
||||
- out.result | length == 2
|
||||
- out.result[0].method == "ssh"
|
||||
- out.result[0].kwargs.check_host_keys == "ignore"
|
||||
- out.result[1].method == "ssh"
|
||||
- out.result[1].kwargs.check_host_keys == "enforce"
|
||||
fail_msg: out={{ out }}
|
||||
tags:
|
||||
- mitogen_only
|
||||
|
||||
|
||||
- hosts: tc-hkc-ssh-host-key-checking
|
||||
tasks:
|
||||
- include_tasks: ../_mitogen_only.yml
|
||||
- {mitogen_get_stack: {}, register: out}
|
||||
- assert:
|
||||
that:
|
||||
- out.result | length == 1
|
||||
- out.result[0].method == "ssh"
|
||||
- out.result[0].kwargs.check_host_keys == "enforce"
|
||||
fail_msg: out={{ out }}
|
||||
tags:
|
||||
- mitogen_only
|
||||
|
||||
- hosts: tc-hkc-ssh-host-key-checking
|
||||
vars:
|
||||
mitogen_via: tc-hkc-unset
|
||||
tasks:
|
||||
- include_tasks: ../_mitogen_only.yml
|
||||
- {mitogen_get_stack: {}, register: out}
|
||||
- assert:
|
||||
that:
|
||||
- out.result | length == 2
|
||||
- out.result[0].method == "ssh"
|
||||
- out.result[0].kwargs.check_host_keys == "ignore"
|
||||
- out.result[1].method == "ssh"
|
||||
- out.result[1].kwargs.check_host_keys == "enforce"
|
||||
fail_msg: out={{ out }}
|
||||
tags:
|
||||
- mitogen_only
|
@ -0,0 +1,9 @@
|
||||
- name: regression/become_test.yml
|
||||
hosts: test-targets:&linux_containers
|
||||
become: true
|
||||
become_user: mitogen__pw_required
|
||||
strategy: mitogen_linear
|
||||
tasks:
|
||||
- command: whoami
|
||||
changed_when: false
|
||||
check_mode: false
|
@ -0,0 +1,67 @@
|
||||
- name: regression/issue_1066__add_host__host_key_checking.yml
|
||||
hosts: test-targets[0]
|
||||
gather_facts: false
|
||||
become: false
|
||||
tasks:
|
||||
- name: Add hosts dynamically
|
||||
add_host:
|
||||
name: "{{ item.name }}"
|
||||
ansible_host_key_checking: "{{ item.host_key_checking | default(omit) }}"
|
||||
ansible_ssh_host_key_checking: "{{ item.host_ssh_key_checking | default(omit) }}"
|
||||
ansible_host: "{{ hostvars[inventory_hostname].ansible_host | default(omit) }}"
|
||||
ansible_password: "{{ hostvars[inventory_hostname].ansible_password | default(omit) }}"
|
||||
ansible_port: "{{ hostvars[inventory_hostname].ansible_port | default(omit) }}"
|
||||
ansible_python_interpreter: "{{ hostvars[inventory_hostname].ansible_python_interpreter | default(omit) }}"
|
||||
ansible_user: "{{ hostvars[inventory_hostname].ansible_user | default(omit) }}"
|
||||
loop:
|
||||
- {name: issue-1066-host-hkc-false, host_key_checking: false}
|
||||
- {name: issue-1066-host-hkc-true, host_key_checking: true}
|
||||
- {name: issue-1066-host-hskc-false, host_ssh_key_checking: false}
|
||||
- {name: issue-1066-host-hskc-true, host_ssh_key_checking: true}
|
||||
delegate_to: localhost
|
||||
tags:
|
||||
- issue_1066
|
||||
|
||||
- name: regression/issue_1066__add_host__host_key_checking.yml
|
||||
hosts: issue-1066-host-*
|
||||
gather_facts: false
|
||||
become: false
|
||||
serial: 1
|
||||
tasks:
|
||||
- meta: reset_connection
|
||||
|
||||
# The host key might be in ~/.ssh/known_hosts. If it's removed then no
|
||||
# problem - test-targets hosts have host_key_checking=false.
|
||||
- name: Remove existing host keys
|
||||
known_hosts:
|
||||
name: "{{ ansible_host }}"
|
||||
state: absent
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Ping dynamically added hosts
|
||||
ping:
|
||||
ignore_errors: true
|
||||
ignore_unreachable: true
|
||||
register: issue_1066_ping
|
||||
|
||||
- debug:
|
||||
var: issue_1066_ping
|
||||
|
||||
- name: Confirm dynamically added hosts are/are not reachable
|
||||
vars:
|
||||
expected:
|
||||
issue-1066-host-hkc-false: {}
|
||||
issue-1066-host-hkc-true: {unreachable: true}
|
||||
issue-1066-host-hskc-false: {}
|
||||
issue-1066-host-hskc-true: {unreachable: true}
|
||||
assert:
|
||||
that:
|
||||
- issue_1066_ping.unreachable is defined == expected[inventory_hostname].unreachable is defined
|
||||
- issue_1066_ping.unreachable | default(42) == expected[inventory_hostname].unreachable | default(42)
|
||||
# ansible_host_key_checking don't work on Vanilla Ansible 2.10, even for
|
||||
# static inventory hosts (ansible/ansible#49254, ansible/ansible#73708).
|
||||
when:
|
||||
- ansible_version.full is version('2.11', '>=', strict=True)
|
||||
or is_mitogen
|
||||
tags:
|
||||
- issue_1066
|
@ -0,0 +1,23 @@
|
||||
- name: regression/issue_952__ask_become_pass.yml
|
||||
hosts: test-targets[0]:&linux_containers
|
||||
gather_facts: false
|
||||
tags:
|
||||
- issue_952
|
||||
tasks:
|
||||
- name: Test --ask-become-pass
|
||||
delegate_to: localhost
|
||||
environment:
|
||||
ANSIBLE_VERBOSITY: "{{ ansible_verbosity }}"
|
||||
expect:
|
||||
command: >
|
||||
ansible-playbook
|
||||
{% for inv in ansible_inventory_sources %}
|
||||
-i "{{ inv }}"
|
||||
{% endfor %}
|
||||
--ask-become-pass
|
||||
regression/become_test.yml
|
||||
chdir: ../
|
||||
responses:
|
||||
'BECOME password:': pw_required_password
|
||||
changed_when: false
|
||||
check_mode: false
|
@ -1,4 +1,7 @@
|
||||
paramiko==2.3.2 # Last 2.6-compat version.
|
||||
# Incompatible with pip >= 72, due to removal of `setup.py test`:
|
||||
# ModuleNotFoundError: No module named 'setuptools.command.test'
|
||||
# https://github.com/pypa/setuptools/issues/4519
|
||||
hdrhistogram==0.6.1
|
||||
PyYAML==3.11; python_version < '2.7'
|
||||
PyYAML==5.3.1; python_version >= '2.7' # Latest release (Jan 2021)
|
||||
|
@ -0,0 +1,3 @@
|
||||
# Setuptools 72 removed `setup.py test`. hdrhistogram 0.6.1 still depends on it.
|
||||
# TODO Bump dependencies and unconstrain Pip.
|
||||
setuptools<72
|
Loading…
Reference in New Issue