45 lines
1.0 KiB
YAML
45 lines
1.0 KiB
YAML
---
|
|
|
|
- hosts: all
|
|
vars:
|
|
resolv_conf_file: /etc/resolv.conf
|
|
dest_dir: /opt/stack
|
|
|
|
pre_tasks:
|
|
|
|
- name: copy '{{ resolv_conf_file}}' file
|
|
become: true
|
|
copy:
|
|
src: '{{ resolv_conf_file }}'
|
|
dest: /etc/resolv.conf
|
|
owner: root
|
|
group: root
|
|
mode: '0644'
|
|
|
|
- name: update APT database
|
|
apt:
|
|
update_cache: true
|
|
cache_valid_time: 3600
|
|
become: true
|
|
when:
|
|
- ansible_os_family == 'Debian'
|
|
|
|
- become: true
|
|
when:
|
|
- ansible_distribution == "CentOS"
|
|
- ansible_distribution_major_version == "8"
|
|
block:
|
|
- name: Switch from CentOS Linux repos to Centos Stream repos
|
|
command: dnf -y swap centos-linux-repos centos-stream-repos
|
|
args:
|
|
warn: false
|
|
|
|
- name: Switch packages from CentOS Linux to to Centos Stream
|
|
command: dnf -y distro-sync
|
|
args:
|
|
warn: false
|
|
|
|
roles:
|
|
- devstack-tobiko-deploy
|
|
- devstack-tobiko-run-tests
|