Skip to content

Commit

Permalink
Add dnf support to ceph playbook
Browse files Browse the repository at this point in the history
Implements: blueprint centos-and-dnf
Change-Id: I78707ce9a8126c9fddb086c9b183294cfc981827
Signed-off-by: Major Hayden <major@mhtx.net>
  • Loading branch information
major authored and cloudnull committed Aug 8, 2017
1 parent f884e33 commit 686c9f3
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions playbooks/ceph-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@
state: present
when:
- ceph_stable
- ansible_pkg_mgr == 'yum'
- ansible_pkg_mgr in ['yum', 'dnf']
- name: add ceph stable repository
package:
name: http://download.ceph.com/rpm-{{ ceph_stable_release }}/{{ ceph_stable_redhat_distro }}/noarch/ceph-release-1-0.{{ ceph_stable_redhat_distro|replace('rhel', 'el') }}.noarch.rpm
state: present
changed_when: false
when:
- ceph_stable
- ansible_pkg_mgr == 'yum'
- name: purge yum cache
command: yum clean all
- ansible_pkg_mgr in ['yum', 'dnf']
- name: Purge yum/dnf cache
command: "{{ ansible_pkg_mgr }} clean all"
when:
ansible_pkg_mgr == 'yum'
- ansible_pkg_mgr in ['yum', 'dnf']
tags:
- skip_ansible_lint
- name: Increase priority for Ceph repos
Expand All @@ -57,7 +57,7 @@
--enable Ceph-noarch
--setopt="Ceph-noarch.priority=50"
when:
- ansible_pkg_mgr == 'yum'
- ansible_pkg_mgr in ['yum', 'dnf']
- name: Create systemd service directory
file:
path: "/etc/systemd/system/ceph-mon@.service.d/"
Expand All @@ -66,7 +66,7 @@
owner: "root"
mode: "0755"
when:
- ansible_pkg_mgr == 'yum'
- ansible_pkg_mgr in ['yum', 'dnf']
- ansible_service_mgr == 'systemd'
- name: Add systemd override for PrivateDevices
copy:
Expand All @@ -75,8 +75,14 @@
[Service]
PrivateDevices=false
when:
- ansible_pkg_mgr == 'yum'
- ansible_pkg_mgr in ['yum', 'dnf']
- ansible_service_mgr == 'systemd'
- name: Ensure Ansible can work with SELinux
package:
name: libselinux-python
state: present
when:
- ansible_pkg_mgr in ['yum', 'dnf']
roles:
- role: "ceph-mon"
tags:
Expand Down Expand Up @@ -128,19 +134,19 @@
state: present
when:
- ceph_stable
- ansible_pkg_mgr == 'yum'
- ansible_pkg_mgr in ['yum', 'dnf']
- name: add ceph stable repository
package:
name: http://download.ceph.com/rpm-{{ ceph_stable_release }}/{{ ceph_stable_redhat_distro }}/noarch/ceph-release-1-0.{{ ceph_stable_redhat_distro|replace('rhel', 'el') }}.noarch.rpm
state: present
changed_when: false
when:
- ceph_stable
- ansible_pkg_mgr == 'yum'
- name: purge yum cache
command: yum clean all
- ansible_pkg_mgr in ['yum', 'dnf']
- name: Purge yum/dnf cache
command: "{{ ansible_pkg_mgr }} clean all"
when:
ansible_pkg_mgr == 'yum'
- ansible_pkg_mgr in ['yum', 'dnf']
tags:
- skip_ansible_lint
- name: Increase priority for Ceph repos
Expand All @@ -151,7 +157,7 @@
--enable Ceph-noarch
--setopt="Ceph-noarch.priority=50"
when:
- ansible_pkg_mgr == 'yum'
- ansible_pkg_mgr in ['yum', 'dnf']
roles:
- role: "ceph-osd"
tags:
Expand Down

0 comments on commit 686c9f3

Please sign in to comment.