diff --git a/docs/source/index.rst b/docs/source/index.rst index 9df9ee59d..ea09fab19 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -25,11 +25,11 @@ You can install directly from the source on github by following these steps: git checkout $branch +.. _ansible-on-rhel-family: Ansible on RHEL and CentOS -------------------------- -You can acquire Ansible on RHEL and CentOS by installing from -`"Extras"`_. +You can acquire Ansible on RHEL and CentOS by installing from `Extras `_. On RHEL:: @@ -43,8 +43,7 @@ On RHEL:: Ansible on Ubuntu ----------------- -You can acquire Ansible on Ubuntu by using the `Ansible -PPA`_. +You can acquire Ansible on Ubuntu by using the `Ansible PPA `_. :: diff --git a/roles/ceph-common/tasks/installs/debian_community_repository.yml b/roles/ceph-common/tasks/installs/debian_community_repository.yml index 10e60dc6d..0e18cd530 100644 --- a/roles/ceph-common/tasks/installs/debian_community_repository.yml +++ b/roles/ceph-common/tasks/installs/debian_community_repository.yml @@ -9,12 +9,3 @@ repo: "deb {{ ceph_stable_repo }} {{ ceph_stable_distro_source | default(ansible_lsb.codename) }} main" state: present changed_when: false - -- name: add nfs-ganesha stable repository - apt_repository: - repo: "deb {{ nfs_ganesha_stable_deb_repo }} {{ ceph_stable_distro_source | default(ansible_lsb.codename) }} main" - state: present - changed_when: false - when: - - nfs_group_name in group_names - - nfs_ganesha_stable diff --git a/roles/ceph-common/tasks/installs/debian_dev_repository.yml b/roles/ceph-common/tasks/installs/debian_dev_repository.yml index c975540f7..586b6771c 100644 --- a/roles/ceph-common/tasks/installs/debian_dev_repository.yml +++ b/roles/ceph-common/tasks/installs/debian_dev_repository.yml @@ -11,23 +11,3 @@ state: present changed_when: false -- name: fetch nfs-ganesha development repository - uri: - url: https://shaman.ceph.com/api/repos/nfs-ganesha/next/latest/{{ ansible_distribution | lower }}/{{ ansible_distribution_release }}/flavors/{{ nfs_ganesha_flavor }}/repo - return_content: yes - register: nfs_ganesha_apt_repo - when: - - nfs_group_name in group_names - - nfs_ganesha_dev - -- name: add nfs-ganesha development repository - copy: - content: "{{ nfs_ganesha_dev_apt_repo.content }}" - dest: /etc/apt/sources.list.d/nfs-ganesha-dev.list - owner: root - group: root - backup: yes - when: - - nfs_group_name in group_names - - nfs_ganesha_dev - diff --git a/roles/ceph-common/tasks/installs/redhat_community_repository.yml b/roles/ceph-common/tasks/installs/redhat_community_repository.yml index 5aff95e0b..013f8aa7f 100644 --- a/roles/ceph-common/tasks/installs/redhat_community_repository.yml +++ b/roles/ceph-common/tasks/installs/redhat_community_repository.yml @@ -12,15 +12,3 @@ state: present gpgkey: "{{ ceph_stable_key }}" baseurl: "{{ ceph_mirror }}/rpm-{{ ceph_stable_release }}/{{ ceph_stable_redhat_distro }}/$basearch" - -- name: add nfs-ganesha stable repository - yum_repository: - name: nfs_ganesha_stable - description: nfs-ganesha stable repo - gpgcheck: yes - state: present - gpgkey: "{{ ceph_stable_key }}" - baseurl: "{{ ceph_mirror }}/nfs-ganesha/rpm-{{ nfs_ganesha_stable_branch }}/luminous/$basearch" - when: - - nfs_group_name in group_names - - nfs_ganesha_stable diff --git a/roles/ceph-common/tasks/installs/redhat_dev_repository.yml b/roles/ceph-common/tasks/installs/redhat_dev_repository.yml index c8fd5bdc9..6bc4b065b 100644 --- a/roles/ceph-common/tasks/installs/redhat_dev_repository.yml +++ b/roles/ceph-common/tasks/installs/redhat_dev_repository.yml @@ -12,56 +12,3 @@ owner: root group: root backup: yes - -- name: fetch nfs-ganesha red hat development repository - uri: - url: https://shaman.ceph.com/api/repos/nfs-ganesha/next/latest/{{ ansible_distribution | lower }}/{{ ansible_distribution_major_version }}/flavors/{{ nfs_ganesha_flavor }}/repo - return_content: yes - register: nfs_ganesha_dev_yum_repo - when: - - nfs_group_name in group_names - - nfs_ganesha_dev - -- name: add nfs-ganesha development repository - copy: - content: "{{ nfs_ganesha_dev_yum_repo.content }}" - dest: /etc/yum.repos.d/nfs-ganesha-dev.repo - owner: root - group: root - backup: yes - when: - - nfs_group_name in group_names - - nfs_ganesha_dev - -- name: set_fact ceph_iscsi_repos - set_fact: - ceph_iscsi_repos: - - ceph-iscsi-config - - tcmu-runner - when: - - ceph_iscsi_config_dev - - iscsi_gw_group_name in group_names - -- name: fetch ceph-iscsi-config red hat development repository - uri: - url: https://shaman.ceph.com/api/repos/{{ item }}/{{ ceph_dev_branch }}/{{ ceph_dev_sha1 }}/{{ ansible_distribution | lower }}/{{ ansible_distribution_major_version }}/repo - return_content: yes - register: ceph_iscsi_config_dev_yum_repo - with_items: "{{ ceph_iscsi_repos }}" - when: - - ceph_iscsi_config_dev - - iscsi_gw_group_name in group_names - -- name: configure ceph-iscsi-config red hat development repository - copy: - content: "{{ item.0.content }}" - dest: "/etc/yum.repos.d/{{ item.1 }}-dev.repo" - owner: root - group: root - backup: yes - with_together: - - "{{ ceph_iscsi_config_dev_yum_repo.results }}" - - "{{ ceph_iscsi_repos }}" - when: - - ceph_iscsi_config_dev - - iscsi_gw_group_name in group_names diff --git a/roles/ceph-iscsi-gw/tasks/prerequisites.yml b/roles/ceph-iscsi-gw/tasks/prerequisites.yml index 3f7ef97a1..347488531 100644 --- a/roles/ceph-iscsi-gw/tasks/prerequisites.yml +++ b/roles/ceph-iscsi-gw/tasks/prerequisites.yml @@ -1,4 +1,43 @@ --- +- name: set_fact ceph_iscsi_repos + set_fact: + ceph_iscsi_repos: + - ceph-iscsi-config + - tcmu-runner + when: + - ansible_os_family == 'RedHat' + - ceph_origin == 'repository' + - ceph_repository == 'dev' + - ceph_iscsi_config_dev + +- name: fetch ceph-iscsi-config red hat development repository + uri: + url: https://shaman.ceph.com/api/repos/{{ item }}/{{ ceph_dev_branch }}/{{ ceph_dev_sha1 }}/{{ ansible_distribution | lower }}/{{ ansible_distribution_major_version }}/repo + return_content: yes + register: ceph_iscsi_config_dev_yum_repo + with_items: "{{ ceph_iscsi_repos }}" + when: + - ansible_os_family == 'RedHat' + - ceph_origin == 'repository' + - ceph_repository == 'dev' + - ceph_iscsi_config_dev + +- name: configure ceph-iscsi-config red hat development repository + copy: + content: "{{ item.0.content }}" + dest: "/etc/yum.repos.d/{{ item.1 }}-dev.repo" + owner: root + group: root + backup: yes + with_together: + - "{{ ceph_iscsi_config_dev_yum_repo.results }}" + - "{{ ceph_iscsi_repos }}" + when: + - ansible_os_family == 'RedHat' + - ceph_origin == 'repository' + - ceph_repository == 'dev' + - ceph_iscsi_config_dev + - name: install redhat ceph iscsi package package: name: "{{ item }}" diff --git a/roles/ceph-nfs/tasks/pre_requisite_non_container.yml b/roles/ceph-nfs/tasks/pre_requisite_non_container.yml index 822eff8af..c6358f905 100644 --- a/roles/ceph-nfs/tasks/pre_requisite_non_container.yml +++ b/roles/ceph-nfs/tasks/pre_requisite_non_container.yml @@ -1,4 +1,77 @@ --- +- name: add nfs-ganesha stable repository + yum_repository: + name: nfs_ganesha_stable + description: nfs-ganesha stable repo + gpgcheck: yes + state: present + gpgkey: "{{ ceph_stable_key }}" + baseurl: "{{ ceph_mirror }}/nfs-ganesha/rpm-{{ nfs_ganesha_stable_branch }}/{{ ceph_release }}/$basearch" + when: + - ansible_os_family == 'RedHat' + - nfs_ganesha_stable + - ceph_origin == 'repository' + - ceph_repository == 'community' + +- name: fetch nfs-ganesha red hat development repository + uri: + url: https://shaman.ceph.com/api/repos/nfs-ganesha/next/latest/{{ ansible_distribution | lower }}/{{ ansible_distribution_major_version }}/flavors/{{ nfs_ganesha_flavor }}/repo + return_content: yes + register: nfs_ganesha_dev_yum_repo + when: + - ansible_os_family == 'RedHat' + - nfs_ganesha_dev + - ceph_origin == 'repository' + - ceph_repository == 'dev' + +- name: add nfs-ganesha development repository + copy: + content: "{{ nfs_ganesha_dev_yum_repo.content }}" + dest: /etc/yum.repos.d/nfs-ganesha-dev.repo + owner: root + group: root + backup: yes + when: + - ansible_os_family == 'RedHat' + - nfs_ganesha_dev + - ceph_origin == 'repository' + - ceph_repository == 'dev' + +- name: add nfs-ganesha stable repository + apt_repository: + repo: "deb {{ nfs_ganesha_stable_deb_repo }} {{ ceph_stable_distro_source | default(ansible_lsb.codename) }} main" + state: present + changed_when: false + when: + - ansible_os_family == 'Debian' + - nfs_ganesha_stable + - ceph_origin == 'repository' + - ceph_repository == 'community' + +- name: fetch nfs-ganesha development repository + uri: + url: https://shaman.ceph.com/api/repos/nfs-ganesha/next/latest/{{ ansible_distribution | lower }}/{{ ansible_distribution_release }}/flavors/{{ nfs_ganesha_flavor }}/repo + return_content: yes + register: nfs_ganesha_apt_repo + when: + - ansible_os_family == 'Debian' + - nfs_ganesha_dev + - ceph_origin == 'repository' + - ceph_repository == 'dev' + +- name: add nfs-ganesha development repository + copy: + content: "{{ nfs_ganesha_dev_apt_repo.content }}" + dest: /etc/apt/sources.list.d/nfs-ganesha-dev.list + owner: root + group: root + backup: yes + when: + - ansible_os_family == 'Debian' + - nfs_ganesha_dev + - ceph_origin == 'repository' + - ceph_repository == 'dev' + - name: install redhat nfs-ganesha-ceph package package: name: nfs-ganesha-ceph @@ -61,6 +134,7 @@ name: nfs-ganesha state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}" when: + - ansible_os_family == 'Debian' - (ceph_origin == 'repository' or ceph_origin == 'distro') - ceph_repository == 'rhcs' @@ -69,6 +143,7 @@ name: nfs-ganesha-ceph state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}" when: + - ansible_os_family == 'Debian' - (ceph_origin == 'repository' or ceph_origin == 'distro') - ceph_repository == 'rhcs' - nfs_file_gw @@ -78,6 +153,7 @@ name: nfs-ganesha-rgw state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}" when: + - ansible_os_family == 'Debian' - (ceph_origin == 'repository' or ceph_origin == 'distro') - ceph_repository == 'rhcs' - nfs_obj_gw