ceph-ansible/tests/functional/setup.yml

69 lines
1.7 KiB
YAML

---
- hosts: all
gather_facts: true
become: yes
tasks:
- name: check if it is Atomic host
stat: path=/run/ostree-booted
register: stat_ostree
check_mode: no
- name: set fact for using Atomic host
set_fact:
is_atomic: '{{ stat_ostree.stat.exists }}'
# we need to install this so the Socket testinfra module
# can use netcat for testing
- name: install net-tools
package:
name: net-tools
state: present
when:
- not is_atomic
- name: disable fastest mirror detection
ini_file:
path: /etc/yum/pluginconf.d/fastestmirror.conf
section: main
option: enabled
value: 0
when: ansible_distribution == 'CentOS'
- name: install epel
package:
name: epel-release
state: present
when:
- ansible_distribution == 'CentOS'
- not is_atomic
- name: enable local epel repository
ini_file:
path: /etc/yum.repos.d/epel.repo
section: epel
option: baseurl
value: http://apt-mirror.front.sepia.ceph.com/epel7/
when:
- ansible_distribution == 'CentOS'
- not is_atomic
- name: disable remote epel repository
ini_file:
path: /etc/yum.repos.d/epel.repo
section: epel
option: metalink
state: absent
when:
- ansible_distribution == 'CentOS'
- not is_atomic
- name: resize logical volume for root partition to fill remaining free space
command: lvresize -l +100%FREE /dev/atomicos/root
when: is_atomic
- name: increasing the size of the fs for root partition
command: xfs_growfs /
when: is_atomic