Files
@ 896fbddd5887
Branch filter:
Location: majic-ansible-roles/roles/ldap_server/molecule/default/prepare.yml - annotation
896fbddd5887
2.2 KiB
text/x-yaml
MAR-131: Refactored pipreqcheck tests in common role to be parametrised, part of preparing for adding Python 3 support.
ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 c082a26b62ff ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 c082a26b62ff c082a26b62ff ec4e3e91c4d3 ec4e3e91c4d3 c082a26b62ff ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 c082a26b62ff c082a26b62ff ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 c082a26b62ff ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 c082a26b62ff ec4e3e91c4d3 ec4e3e91c4d3 c082a26b62ff ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 c082a26b62ff ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 c082a26b62ff c082a26b62ff c082a26b62ff c082a26b62ff c082a26b62ff c082a26b62ff c082a26b62ff c082a26b62ff c082a26b62ff c082a26b62ff c082a26b62ff c082a26b62ff c082a26b62ff c082a26b62ff c082a26b62ff c082a26b62ff c082a26b62ff c082a26b62ff c082a26b62ff 86aefe445dcc 86aefe445dcc | ---
- name: Prepare
hosts: all
gather_facts: false
tasks:
- name: Install python for Ansible
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
become: true
changed_when: false
- hosts: all
become: true
tasks:
- name: Update all caches to avoid errors due to missing remote archives
apt:
update_cache: true
changed_when: false
- name: Deploy CA certificate
copy:
src: tests/data/x509/ca.cert.pem
dest: /etc/ssl/certs/testca.cert.pem
owner: root
group: root
mode: 0644
- hosts: client
become: true
tasks:
- name: Install tool for teting TCP connectivity
apt:
name: hping3
state: present
- hosts: parameters-optional
become: true
tasks:
- name: Set-up the hosts file
lineinfile:
path: /etc/hosts
regexp: "^{{ item.key }}"
line: "{{ item.key }} {{ item.value }}"
owner: root
group: root
mode: 0644
state: present
with_dict:
127.0.2.1: parameters-optional
- hosts: parameters-mandatory
become: true
tasks:
- name: Set-up the hosts file
lineinfile:
path: /etc/hosts
regexp: "^{{ item.key }}"
line: "{{ item.key }} {{ item.value }}"
owner: root
group: root
mode: 0644
state: present
with_dict:
127.0.2.1: parameters-mandatory.local
- hosts: backup-server
become: true
roles:
- role: backup_server
backup_host_ssh_private_keys:
dsa: "{{ lookup('file', 'tests/data/ssh/server_dsa') }}"
rsa: "{{ lookup('file', 'tests/data/ssh/server_rsa') }}"
ed25519: "{{ lookup('file', 'tests/data/ssh/server_ed25519') }}"
ecdsa: "{{ lookup('file', 'tests/data/ssh/server_ecdsa') }}"
backup_clients:
- server: localhost
ip: 127.0.0.1
public_key: "{{ lookup('file', 'tests/data/ssh/parameters-optional.pub') }}"
- hosts: parameters-mandatory,parameters-optional
become: true
tasks:
- name: Rename the ss utility (see https://github.com/philpep/testinfra/pull/320)
command: "mv /bin/ss /bin/ss.bak"
|