2014-09-05 03:14:11 +08:00
|
|
|
---
|
2016-11-28 22:16:56 +08:00
|
|
|
- name: install redhat dependencies
|
|
|
|
package:
|
2016-06-16 22:06:31 +08:00
|
|
|
name: "{{ item }}"
|
|
|
|
state: present
|
2016-08-24 12:23:47 +08:00
|
|
|
with_items: "{{ redhat_package_dependencies }}"
|
2016-11-28 22:16:56 +08:00
|
|
|
when: ansible_distribution == "RedHat"
|
2016-01-29 02:11:22 +08:00
|
|
|
|
2016-11-28 22:16:56 +08:00
|
|
|
- name: install centos dependencies
|
|
|
|
package:
|
2016-01-29 02:11:22 +08:00
|
|
|
name: "{{ item }}"
|
|
|
|
state: present
|
2016-08-24 12:23:47 +08:00
|
|
|
with_items: "{{ centos_package_dependencies }}"
|
2016-11-28 22:16:56 +08:00
|
|
|
when: ansible_distribution == "CentOS"
|
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 }}"
|
2016-10-10 15:57:37 +08:00
|
|
|
with_items: "{{ (rundep_location|default({})).stdout_lines|default([]) }}"
|
2016-06-06 22:22:20 +08:00
|
|
|
when:
|
|
|
|
- ceph_origin == 'local'
|
|
|
|
- use_installer
|
|
|
|
|
|
|
|
- name: install ceph dependencies
|
|
|
|
script: "{{ ansible_dir }}/rundep_installer.sh {{ item }}"
|
|
|
|
become: true
|
2016-10-10 15:57:37 +08:00
|
|
|
with_items: "{{ (rundep_location|default({})).stdout_lines|default([]) }}"
|
2016-06-06 22:22:20 +08:00
|
|
|
when:
|
|
|
|
- ceph_origin == 'local'
|
|
|
|
- use_installer
|
|
|
|
|
2017-07-07 01:29:43 +08:00
|
|
|
- name: ensure rsync is installed
|
|
|
|
package:
|
|
|
|
name: rsync
|
|
|
|
state: present
|
|
|
|
when:
|
|
|
|
- ceph_origin == 'local'
|
|
|
|
|
2016-06-06 22:22:20 +08:00
|
|
|
- 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
|
|
|
|
2017-08-12 23:41:44 +08:00
|
|
|
- name: install ceph-common
|
|
|
|
package:
|
|
|
|
name: 'ceph-common'
|
|
|
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
|
|
|
|
2016-11-28 22:16:56 +08:00
|
|
|
- name: install distro or red hat storage ceph mon
|
|
|
|
package:
|
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
|
2015-07-01 21:58:38 +08:00
|
|
|
|
2016-11-28 22:16:56 +08:00
|
|
|
- name: install distro or red hat storage ceph osd
|
|
|
|
package:
|
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
|
2016-01-29 02:11:22 +08:00
|
|
|
|
2016-11-28 22:16:56 +08:00
|
|
|
- name: install distro or red hat storage ceph mds
|
|
|
|
package:
|
2016-05-07 08:37:09 +08:00
|
|
|
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
|
2016-09-23 11:00:02 +08:00
|
|
|
|
2016-11-28 22:16:56 +08:00
|
|
|
- name: install distro or red hat storage ceph-fuse
|
|
|
|
package:
|
2016-09-23 11:00:02 +08:00
|
|
|
name: "ceph-fuse"
|
|
|
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
|
|
|
when:
|
|
|
|
- client_group_name in group_names
|
|
|
|
|
2016-11-28 22:16:56 +08:00
|
|
|
- name: install distro or red hat storage ceph base
|
|
|
|
package:
|
2016-05-11 00:29:27 +08:00
|
|
|
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
|
2016-05-11 00:29:27 +08:00
|
|
|
|
2016-02-20 07:39:33 +08:00
|
|
|
- name: install ceph-test
|
2016-11-28 22:16:56 +08:00
|
|
|
package:
|
2016-02-20 07:39:33 +08:00
|
|
|
name: ceph-test
|
|
|
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
2016-11-28 22:16:56 +08:00
|
|
|
when: ceph_test
|
2016-02-20 07:39:33 +08:00
|
|
|
|
2015-08-03 23:39:57 +08:00
|
|
|
- name: install rados gateway
|
2016-11-28 22:16:56 +08:00
|
|
|
package:
|
2015-09-04 00:18:53 +08:00
|
|
|
name: ceph-radosgw
|
2016-01-29 23:54:59 +08:00
|
|
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
2016-11-28 22:16:56 +08:00
|
|
|
when: rgw_group_name in group_names
|
2016-05-06 02:20:03 +08:00
|
|
|
|
2016-07-21 21:17:19 +08:00
|
|
|
- name: install nfs ceph gateway
|
2016-11-28 22:16:56 +08:00
|
|
|
package:
|
2016-05-06 02:20:03 +08:00
|
|
|
name: nfs-ganesha-ceph
|
|
|
|
when:
|
|
|
|
- nfs_group_name in group_names
|
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 rgw gateway
|
2016-11-28 22:16:56 +08:00
|
|
|
package:
|
2016-07-21 21:17:19 +08:00
|
|
|
name: "{{ item }}"
|
|
|
|
with_items:
|
|
|
|
- nfs-ganesha-rgw
|
|
|
|
- ceph-radosgw
|
|
|
|
when:
|
|
|
|
- nfs_group_name in group_names
|
2016-08-18 20:24:48 +08:00
|
|
|
- nfs_obj_gw
|
2017-03-16 17:17:08 +08:00
|
|
|
|
|
|
|
- name: install ceph mgr
|
|
|
|
package:
|
|
|
|
name: ceph-mgr
|
|
|
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
2017-05-04 17:14:58 +08:00
|
|
|
when:
|
|
|
|
- mgr_group_name in group_names
|
|
|
|
- ceph_release_num.{{ ceph_release }} > ceph_release_num.jewel
|