windmill/tests/playbooks/pre.yaml

57 lines
1.6 KiB
YAML

---
- hosts: all
tasks:
- name: Disable extra wheels mirror
become: true
lineinfile:
dest: /etc/pip.conf
regexp: ^extra-index-url
state: absent
- name: Remove exclude from dnf.conf
become: true
lineinfile:
dest: /etc/dnf/dnf.conf
regexp: ^exclude
state: absent
when: ansible_os_family == 'RedHat'
- name: Install ansible configuration file
template:
dest: ~/.ansible.cfg
src: "{{ zuul.executor.work_root }}/{{ windmill_src_dir }}/inventory/testing/ansible.cfg"
- name: Set ARA fact for Debian
set_fact:
ara_path: /opt/venv/ansible/lib/python3.6/site-packages/ara/plugins/callbacks
when: ansible_os_family == 'Debian'
- name: Set ARA fact for RedHat
set_fact:
ara_path: /opt/venv/ansible/lib/python3.7/site-packages/ara/plugins/callbacks
when: ansible_os_family == 'RedHat'
- name: Enable ARA callback plugin
ini_file:
path: ~/.ansible.cfg
section: defaults
option: callback_plugins
value: "{{ ara_path }}"
- name: Bootstrap tox environment
args:
chdir: "{{ item }}"
shell: tox -evenv --notest
with_items:
- ~/src/git.openstack.org/openstack/windmill-ops
- ~/src/git.openstack.org/openstack/windmill
- name: Install ansible roles via galaxy
args:
chdir: "{{ item }}"
executable: /bin/bash
shell: source .tox/venv/bin/activate; ./tools/install_roles.sh --force
with_items:
- ~/src/git.openstack.org/openstack/windmill-ops
- ~/src/git.openstack.org/openstack/windmill