mirror of https://github.com/ceph/ceph-ansible.git
commit
bbe6f752e8
|
@ -0,0 +1,97 @@
|
||||||
|
---
|
||||||
|
- hosts: localhost
|
||||||
|
gather_facts: false
|
||||||
|
become: yes
|
||||||
|
tags:
|
||||||
|
- vagrant_setup
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
- name: change centos/7 vagrant box name to rhel7
|
||||||
|
replace:
|
||||||
|
regexp: "centos/7"
|
||||||
|
replace: "rhel7"
|
||||||
|
dest: "{{ change_dir }}/vagrant_variables.yml"
|
||||||
|
when: change_dir is defined
|
||||||
|
|
||||||
|
- name: change ceph/ubuntu-xenial vagrant box name to rhel7
|
||||||
|
replace:
|
||||||
|
regexp: "ceph/ubuntu-xenial"
|
||||||
|
replace: "rhel7"
|
||||||
|
dest: "{{ change_dir }}/vagrant_variables.yml"
|
||||||
|
when: change_dir is defined
|
||||||
|
|
||||||
|
- hosts: all
|
||||||
|
gather_facts: true
|
||||||
|
become: yes
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
- name: check if it is Atomic host
|
||||||
|
stat: path=/run/ostree-booted
|
||||||
|
register: stat_ostree
|
||||||
|
always_run: true
|
||||||
|
|
||||||
|
- name: set fact for using Atomic host
|
||||||
|
set_fact:
|
||||||
|
is_atomic: '{{ stat_ostree.stat.exists }}'
|
||||||
|
|
||||||
|
- name: install nightly rhel7 repo
|
||||||
|
get_url:
|
||||||
|
url: "{{ rhel7_repo_url }}"
|
||||||
|
dest: /etc/yum.repos.d
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
when: not is_atomic
|
||||||
|
|
||||||
|
- name: set MTU on eth0
|
||||||
|
command: "ifconfig eth0 mtu 1400 up"
|
||||||
|
|
||||||
|
- name: set MTU on eth1
|
||||||
|
command: "ifconfig eth1 mtu 1400 up"
|
||||||
|
|
||||||
|
- hosts: mons
|
||||||
|
gather_facts: false
|
||||||
|
become: yes
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
- name: install ceph mon repo
|
||||||
|
yum_repository:
|
||||||
|
name: ceph-mon
|
||||||
|
description: repo for rhcs ceph-mon
|
||||||
|
baseurl: "{{ repo_url }}/MON/x86_64/os/"
|
||||||
|
gpgcheck: no
|
||||||
|
enabled: yes
|
||||||
|
when:
|
||||||
|
- not is_atomic
|
||||||
|
|
||||||
|
- hosts: osds
|
||||||
|
gather_facts: false
|
||||||
|
become: yes
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
- name: install ceph osd repo
|
||||||
|
yum_repository:
|
||||||
|
name: ceph-osd
|
||||||
|
description: repo for rhcs ceph-osd
|
||||||
|
baseurl: "{{ repo_url }}/OSD/x86_64/os/"
|
||||||
|
gpgcheck: no
|
||||||
|
enabled: yes
|
||||||
|
when:
|
||||||
|
- not is_atomic
|
||||||
|
|
||||||
|
- name: set MTU on eth2
|
||||||
|
command: "ifconfig eth2 mtu 1400 up"
|
||||||
|
|
||||||
|
- hosts: mdss:rgws:clients
|
||||||
|
gather_facts: false
|
||||||
|
become: yes
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
- name: install ceph tools repo
|
||||||
|
yum_repository:
|
||||||
|
name: ceph-osd
|
||||||
|
description: repo for rhcs ceph tools
|
||||||
|
baseurl: "{{ repo_url }}/Tools/x86_64/os/"
|
||||||
|
gpgcheck: no
|
||||||
|
enabled: yes
|
||||||
|
when:
|
||||||
|
- not is_atomic
|
10
tox.ini
10
tox.ini
|
@ -1,5 +1,5 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = {ansible2.2}-{xenial_cluster,journal_collocation,centos7_cluster,dmcrypt_journal,dmcrypt_journal_collocation,docker_cluster,purge_cluster,purge_dmcrypt,docker_dedicated_journal,docker_dmcrypt_journal_collocation,update_dmcrypt,update_cluster}
|
envlist = {,rhcs-}{ansible2.2}-{xenial_cluster,journal_collocation,centos7_cluster,dmcrypt_journal,dmcrypt_journal_collocation,docker_cluster,purge_cluster,purge_dmcrypt,docker_dedicated_journal,docker_dmcrypt_journal_collocation,update_dmcrypt,update_cluster}
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
# extra commands for purging clusters
|
# extra commands for purging clusters
|
||||||
|
@ -69,7 +69,9 @@ setenv=
|
||||||
ANSIBLE_STDOUT_CALLBACK = debug
|
ANSIBLE_STDOUT_CALLBACK = debug
|
||||||
docker_cluster: PLAYBOOK = site-docker.yml.sample
|
docker_cluster: PLAYBOOK = site-docker.yml.sample
|
||||||
docker_dedicated_journal: PLAYBOOK = site-docker.yml.sample
|
docker_dedicated_journal: PLAYBOOK = site-docker.yml.sample
|
||||||
docker_dmcrypt_journal_collocation = site-docker.yml.sample
|
docker_dmcrypt_journal_collocation: PLAYBOOK = site-docker.yml.sample
|
||||||
|
rhcs: CEPH_RHCS = true
|
||||||
|
rhcs: CEPH_STABLE = false
|
||||||
deps=
|
deps=
|
||||||
ansible1.9: ansible==1.9.4
|
ansible1.9: ansible==1.9.4
|
||||||
ansible2.1: ansible==2.1
|
ansible2.1: ansible==2.1
|
||||||
|
@ -95,9 +97,13 @@ changedir=
|
||||||
update_dmcrypt: {toxinidir}/tests/functional/centos/7/dmcrypt-dedicated-journal
|
update_dmcrypt: {toxinidir}/tests/functional/centos/7/dmcrypt-dedicated-journal
|
||||||
update_cluster: {toxinidir}/tests/functional/centos/7/cluster
|
update_cluster: {toxinidir}/tests/functional/centos/7/cluster
|
||||||
commands=
|
commands=
|
||||||
|
rhcs: ansible-playbook -vv -i "localhost," -c local {toxinidir}/tests/functional/rhcs_setup.yml --extra-vars "change_dir={changedir}" --tags "vagrant_setup"
|
||||||
|
|
||||||
vagrant up --no-provision {posargs:--provider=virtualbox}
|
vagrant up --no-provision {posargs:--provider=virtualbox}
|
||||||
bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}
|
bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}
|
||||||
|
|
||||||
|
rhcs: ansible-playbook -vv -i {changedir}/hosts {toxinidir}/tests/functional/rhcs_setup.yml --extra-vars "repo_url={env:REPO_URL:} rhel7_repo_url={env:RHEL7_REPO_URL:}" --skip-tags "vagrant_setup"
|
||||||
|
|
||||||
ansible-playbook -vv -i {changedir}/hosts {toxinidir}/{env:PLAYBOOK:site.yml.sample} --extra-vars '\
|
ansible-playbook -vv -i {changedir}/hosts {toxinidir}/{env:PLAYBOOK:site.yml.sample} --extra-vars '\
|
||||||
\{\
|
\{\
|
||||||
"fetch_directory":"{env:FETCH_DIRECTORY:{changedir}/fetch}",\
|
"fetch_directory":"{env:FETCH_DIRECTORY:{changedir}/fetch}",\
|
||||||
|
|
Loading…
Reference in New Issue