ceph-ansible/roles/ceph-nfs/tasks/pre_requisite_non_container...

44 lines
1.7 KiB
YAML

---
- name: Red hat based systems - repo handling
when: ceph_origin == 'repository'
block:
- name: Red hat based systems - stable repo related tasks
when:
- nfs_ganesha_stable | bool
- ceph_repository == 'community'
block:
- name: Add nfs-ganesha stable repository
ansible.builtin.package:
name: "{{ centos_release_nfs }}"
state: present
- name: Red hat based systems - dev repo related tasks
when:
- nfs_ganesha_dev | bool
- ceph_repository == 'dev'
block:
- name: Add nfs-ganesha dev repo
ansible.builtin.get_url:
url: "https://shaman.ceph.com/api/repos/nfs-ganesha/next/latest/{{ ansible_facts['distribution'] | lower }}/{{ ansible_facts['distribution_major_version'] }}/flavors/{{ nfs_ganesha_flavor }}/repo?arch={{ ansible_facts['architecture'] }}"
dest: /etc/yum.repos.d/nfs-ganesha-dev.repo
mode: "0644"
force: true
- name: Red hat based systems - install nfs packages
block:
- name: Install nfs cephfs gateway
ansible.builtin.package:
name: ['nfs-ganesha-ceph', 'nfs-ganesha-rados-grace']
state: "{{ (upgrade_ceph_packages | bool) | ternary('latest', 'present') }}"
register: result
until: result is succeeded
when: nfs_file_gw | bool
- name: Install redhat nfs-ganesha-rgw and ceph-radosgw packages
ansible.builtin.package:
name: ['nfs-ganesha-rgw', 'nfs-ganesha-rados-grace', 'nfs-ganesha-rados-urls', 'ceph-radosgw']
state: "{{ (upgrade_ceph_packages | bool) | ternary('latest', 'present') }}"
register: result
until: result is succeeded
when: nfs_obj_gw | bool