2014-09-05 03:14:11 +08:00
|
|
|
---
|
2016-06-16 22:06:31 +08:00
|
|
|
- name: install redhat dependencies via yum
|
2015-09-04 00:18:53 +08:00
|
|
|
yum:
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: present
|
2015-08-26 17:19:35 +08:00
|
|
|
with_items: redhat_package_dependencies
|
2016-03-03 07:05:37 +08:00
|
|
|
when:
|
2016-05-09 22:08:33 +08:00
|
|
|
- ansible_distribution == "RedHat"
|
|
|
|
- ansible_pkg_mgr == "yum"
|
2016-03-03 07:05:37 +08:00
|
|
|
|
2016-06-16 22:06:31 +08:00
|
|
|
- name: install redhat dependencies via dnf
|
|
|
|
dnf:
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: present
|
|
|
|
with_items: redhat_package_dependencies
|
|
|
|
when:
|
|
|
|
- ansible_distribution == "RedHat"
|
|
|
|
- ansible_pkg_mgr == "dnf"
|
|
|
|
|
|
|
|
- name: install centos dependencies via yum
|
2016-03-03 07:05:37 +08:00
|
|
|
yum:
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: present
|
|
|
|
with_items: centos_package_dependencies
|
|
|
|
when:
|
2016-05-09 22:08:33 +08:00
|
|
|
- ansible_distribution == "CentOS"
|
|
|
|
- ansible_pkg_mgr == "yum"
|
2016-01-29 02:11:22 +08:00
|
|
|
|
2016-06-16 22:06:31 +08:00
|
|
|
- name: install centos dependencies via dnf
|
2016-01-29 02:11:22 +08:00
|
|
|
dnf:
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: present
|
2016-03-03 07:05:37 +08:00
|
|
|
with_items: centos_package_dependencies
|
|
|
|
when:
|
2016-05-09 22:08:33 +08:00
|
|
|
- ansible_distribution == "CentOS"
|
|
|
|
- ansible_pkg_mgr == "dnf"
|
2014-09-05 03:14:11 +08:00
|
|
|
|
2015-08-31 21:23:29 +08:00
|
|
|
- name: configure ceph yum repository
|
|
|
|
include: redhat_ceph_repository.yml
|
|
|
|
when: ceph_origin == 'upstream'
|
2015-07-02 17:08:59 +08:00
|
|
|
|
2016-06-06 22:22:20 +08:00
|
|
|
- name: make sure /tmp exists
|
|
|
|
file:
|
|
|
|
path: /tmp
|
|
|
|
state: directory
|
|
|
|
when:
|
|
|
|
- ceph_origin == 'local'
|
|
|
|
- use_installer
|
|
|
|
|
|
|
|
- name: use mktemp to create name for rundep
|
|
|
|
command: "mktemp /tmp/rundep.XXXXXXXX"
|
|
|
|
register: rundep_location
|
|
|
|
when:
|
|
|
|
- ceph_origin == 'local'
|
|
|
|
- use_installer
|
|
|
|
|
|
|
|
- name: copy rundep
|
|
|
|
copy:
|
|
|
|
src: "{{ansible_dir}}/rundep"
|
|
|
|
dest: "{{ item }}"
|
|
|
|
with_items: rundep_location.stdout_lines
|
|
|
|
when:
|
|
|
|
- ceph_origin == 'local'
|
|
|
|
- use_installer
|
|
|
|
|
|
|
|
- name: install ceph dependencies
|
|
|
|
script: "{{ ansible_dir }}/rundep_installer.sh {{ item }}"
|
|
|
|
become: true
|
|
|
|
with_items: rundep_location.stdout_lines
|
|
|
|
when:
|
|
|
|
- ceph_origin == 'local'
|
|
|
|
- use_installer
|
|
|
|
|
2015-07-24 02:01:43 +08:00
|
|
|
- name: install ceph
|
2015-09-04 00:18:53 +08:00
|
|
|
yum:
|
|
|
|
name: ceph
|
2016-01-29 23:54:59 +08:00
|
|
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
2016-06-06 22:22:20 +08:00
|
|
|
when:
|
|
|
|
- not use_server_package_split
|
|
|
|
- ansible_pkg_mgr == "yum"
|
|
|
|
- ceph_origin != 'local'
|
|
|
|
|
|
|
|
- name: synchronize ceph install
|
|
|
|
synchronize:
|
|
|
|
src: "{{ceph_installation_dir}}/"
|
|
|
|
dest: "/"
|
|
|
|
when:
|
|
|
|
- ceph_origin == 'local'
|
|
|
|
|
|
|
|
- name: create user group ceph
|
|
|
|
group:
|
|
|
|
name: 'ceph'
|
|
|
|
when:
|
|
|
|
- ceph_origin == 'local'
|
|
|
|
|
|
|
|
- name: create user ceph
|
|
|
|
user:
|
|
|
|
name: 'ceph'
|
|
|
|
when:
|
|
|
|
- ceph_origin == 'local'
|
2015-07-01 21:58:38 +08:00
|
|
|
|
2016-06-06 22:22:20 +08:00
|
|
|
- name: install distro or red hat storage ceph mon via yum
|
2015-09-04 00:18:53 +08:00
|
|
|
yum:
|
2016-04-28 05:10:39 +08:00
|
|
|
name: "ceph-mon"
|
2016-01-29 23:54:59 +08:00
|
|
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
2015-07-01 21:58:38 +08:00
|
|
|
when:
|
2016-05-09 22:08:33 +08:00
|
|
|
- mon_group_name in group_names
|
|
|
|
- ansible_pkg_mgr == "yum"
|
|
|
|
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
|
|
|
|
or ceph_dev
|
|
|
|
or ceph_origin == "distro"
|
2016-06-22 22:13:55 +08:00
|
|
|
or ceph_custom
|
2016-01-29 02:11:22 +08:00
|
|
|
|
2016-06-06 22:22:20 +08:00
|
|
|
- name: install distro or red hat storage ceph mon via dnf
|
2016-01-29 02:11:22 +08:00
|
|
|
dnf:
|
2016-04-28 05:10:39 +08:00
|
|
|
name: "ceph-mon"
|
2016-01-29 23:54:59 +08:00
|
|
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
2016-01-29 02:11:22 +08:00
|
|
|
when:
|
2016-05-09 22:08:33 +08:00
|
|
|
- mon_group_name in group_names
|
|
|
|
- ansible_pkg_mgr == "dnf"
|
|
|
|
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
|
|
|
|
or ceph_origin == "distro"
|
|
|
|
or ceph_dev
|
2016-06-22 22:13:55 +08:00
|
|
|
or ceph_custom
|
2015-07-01 21:58:38 +08:00
|
|
|
|
2016-06-06 22:22:20 +08:00
|
|
|
- name: install distro or red hat storage ceph osd via yum
|
2015-09-04 00:18:53 +08:00
|
|
|
yum:
|
2016-04-28 05:10:39 +08:00
|
|
|
name: "ceph-osd"
|
2016-01-29 23:54:59 +08:00
|
|
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
2015-07-01 21:58:38 +08:00
|
|
|
when:
|
2016-05-09 22:08:33 +08:00
|
|
|
- osd_group_name in group_names
|
|
|
|
- ansible_pkg_mgr == "yum"
|
|
|
|
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
|
|
|
|
or ceph_origin == "distro"
|
|
|
|
or ceph_dev
|
2016-06-22 22:13:55 +08:00
|
|
|
or ceph_custom
|
2016-01-29 02:11:22 +08:00
|
|
|
|
2016-06-06 22:22:20 +08:00
|
|
|
- name: install distro or red hat storage ceph osd via dnf
|
2016-01-29 02:11:22 +08:00
|
|
|
dnf:
|
2016-04-28 05:10:39 +08:00
|
|
|
name: "ceph-osd"
|
2016-01-29 23:54:59 +08:00
|
|
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
2016-01-29 02:11:22 +08:00
|
|
|
when:
|
2016-05-09 22:08:33 +08:00
|
|
|
- osd_group_name in group_names
|
|
|
|
- ansible_pkg_mgr == "dnf"
|
|
|
|
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
|
|
|
|
or ceph_origin == "distro"
|
|
|
|
or ceph_dev
|
2016-06-22 22:13:55 +08:00
|
|
|
or ceph_custom
|
2014-12-18 19:20:17 +08:00
|
|
|
|
2016-06-06 22:22:20 +08:00
|
|
|
- name: install distro or red hat storage ceph mds via yum
|
2016-05-07 08:37:09 +08:00
|
|
|
yum:
|
|
|
|
name: "ceph-mds"
|
|
|
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
|
|
|
when:
|
2016-06-22 22:13:55 +08:00
|
|
|
- mds_group_name in group_names
|
|
|
|
- ansible_pkg_mgr == "yum"
|
|
|
|
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
|
|
|
|
or ceph_origin == "distro"
|
|
|
|
or ceph_dev
|
|
|
|
or ceph_custom
|
2016-05-07 08:37:09 +08:00
|
|
|
|
2016-06-06 22:22:20 +08:00
|
|
|
- name: install distro or red hat storage ceph mds via dnf
|
2016-05-07 08:37:09 +08:00
|
|
|
dnf:
|
|
|
|
name: "ceph-mds"
|
|
|
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
|
|
|
when:
|
2016-06-22 22:13:55 +08:00
|
|
|
- mds_group_name in group_names
|
|
|
|
- ansible_pkg_mgr == "dnf"
|
|
|
|
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
|
|
|
|
or ceph_origin == "distro"
|
|
|
|
or ceph_dev
|
|
|
|
or ceph_custom
|
2016-05-07 08:37:09 +08:00
|
|
|
|
2016-06-06 22:22:20 +08:00
|
|
|
- name: install distro or red hat storage ceph base via yum
|
2016-05-11 00:29:27 +08:00
|
|
|
yum:
|
|
|
|
name: "ceph-base"
|
|
|
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
|
|
|
when:
|
2016-06-22 22:13:55 +08:00
|
|
|
- client_group_name in group_names
|
|
|
|
- ansible_pkg_mgr == "yum"
|
|
|
|
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
|
|
|
|
or ceph_origin == "distro"
|
|
|
|
or ceph_dev
|
|
|
|
or ceph_custom
|
2016-05-11 00:29:27 +08:00
|
|
|
|
2016-06-06 22:22:20 +08:00
|
|
|
- name: install distro or red hat storage ceph base via dnf
|
2016-05-11 00:29:27 +08:00
|
|
|
dnf:
|
|
|
|
name: "ceph-base"
|
|
|
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
|
|
|
when:
|
2016-06-22 22:13:55 +08:00
|
|
|
- client_group_name in group_names
|
|
|
|
- ansible_pkg_mgr == "dnf"
|
|
|
|
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
|
|
|
|
or ceph_origin == "distro"
|
|
|
|
or ceph_dev
|
|
|
|
or ceph_custom
|
2016-05-11 00:29:27 +08:00
|
|
|
|
2016-02-20 07:39:33 +08:00
|
|
|
- name: install ceph-test
|
|
|
|
yum:
|
|
|
|
name: ceph-test
|
|
|
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
|
|
|
when:
|
2016-05-09 22:08:33 +08:00
|
|
|
- ceph_test
|
|
|
|
- ansible_pkg_mgr == "yum"
|
2016-02-20 07:39:33 +08:00
|
|
|
|
|
|
|
- name: install ceph-test
|
|
|
|
dnf:
|
|
|
|
name: ceph-test
|
|
|
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
|
|
|
when:
|
2016-05-09 22:08:33 +08:00
|
|
|
- ceph_test
|
|
|
|
- ansible_pkg_mgr == "dnf"
|
2016-02-20 07:39:33 +08:00
|
|
|
|
2015-08-03 23:39:57 +08:00
|
|
|
- name: install rados gateway
|
2015-09-04 00:18:53 +08:00
|
|
|
yum:
|
|
|
|
name: ceph-radosgw
|
2016-01-29 23:54:59 +08:00
|
|
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
2015-08-03 23:39:57 +08:00
|
|
|
when:
|
2016-05-09 22:08:33 +08:00
|
|
|
- rgw_group_name in group_names
|
|
|
|
- ansible_pkg_mgr == "yum"
|
2016-01-29 02:11:22 +08:00
|
|
|
|
|
|
|
- name: install rados gateway
|
|
|
|
dnf:
|
|
|
|
name: ceph-radosgw
|
2016-01-29 23:54:59 +08:00
|
|
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
2016-01-29 02:11:22 +08:00
|
|
|
when:
|
2016-05-09 22:08:33 +08:00
|
|
|
- rgw_group_name in group_names
|
|
|
|
- ansible_pkg_mgr == "dnf"
|
2016-05-06 02:20:03 +08:00
|
|
|
|
2016-07-21 21:17:19 +08:00
|
|
|
- name: install nfs ceph gateway
|
2016-05-06 02:20:03 +08:00
|
|
|
yum:
|
|
|
|
name: nfs-ganesha-ceph
|
|
|
|
when:
|
|
|
|
- nfs_group_name in group_names
|
|
|
|
- ansible_pkg_mgr == "yum"
|
2016-08-18 20:24:48 +08:00
|
|
|
- nfs_file_gw
|
2016-05-06 02:20:03 +08:00
|
|
|
|
2016-07-21 21:17:19 +08:00
|
|
|
- name: install nfs ceph gateway
|
2016-05-06 02:20:03 +08:00
|
|
|
dnf:
|
|
|
|
name: nfs-ganesha-ceph
|
|
|
|
when:
|
|
|
|
- nfs_group_name in group_names
|
|
|
|
- ansible_pkg_mgr == "dnf"
|
2016-08-18 20:24:48 +08:00
|
|
|
- nfs_file_gw
|
2016-07-21 21:17:19 +08:00
|
|
|
|
|
|
|
- name: install nfs rgw gateway
|
|
|
|
yum:
|
|
|
|
name: "{{ item }}"
|
|
|
|
with_items:
|
|
|
|
- nfs-ganesha-rgw
|
|
|
|
- ceph-radosgw
|
|
|
|
when:
|
|
|
|
- nfs_group_name in group_names
|
|
|
|
- ansible_pkg_mgr == "yum"
|
2016-08-18 20:24:48 +08:00
|
|
|
- nfs_obj_gw
|
2016-07-21 21:17:19 +08:00
|
|
|
|
|
|
|
- name: install nfs rgw gateway
|
|
|
|
dnf:
|
|
|
|
name: "{{ item }}"
|
|
|
|
with_items:
|
|
|
|
- nfs-ganesha-rgw
|
|
|
|
- ceph-radosgw
|
|
|
|
when:
|
|
|
|
- nfs_group_name in group_names
|
|
|
|
- ansible_pkg_mgr == "dnf"
|
2016-08-18 20:24:48 +08:00
|
|
|
- nfs_obj_gw
|