ceph-common: export repository configuration to a single task

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
pull/6767/head
Seena Fallah 2021-08-05 20:16:04 +04:30
parent 0b78faa723
commit f143075362
5 changed files with 42 additions and 36 deletions

View File

@ -0,0 +1,31 @@
---
- name: config repository for Red Hat based OS
when: ansible_facts['os_family'] == 'RedHat'
block:
- name: include installs/configure_redhat_repository_installation.yml
include_tasks: installs/configure_redhat_repository_installation.yml
when: ceph_origin == 'repository'
- name: include installs/configure_redhat_local_installation.yml
include_tasks: installs/configure_redhat_local_installation.yml
when: ceph_origin == 'local'
- name: config repository for Debian based OS
when: ansible_facts['os_family'] == 'Debian'
block:
- name: include installs/configure_debian_repository_installation.yml
include_tasks: installs/configure_debian_repository_installation.yml
when: ceph_origin == 'repository'
- name: update apt cache if cache_valid_time has expired
apt:
update_cache: yes
cache_valid_time: 3600
register: result
until: result is succeeded
- name: include installs/configure_suse_repository_installation.yml
include_tasks: installs/configure_suse_repository_installation.yml
when:
- ansible_facts['os_family'] == 'Suse'
- ceph_origin == 'repository'

View File

@ -1,15 +1,3 @@
---
- name: include configure_debian_repository_installation.yml
include_tasks: configure_debian_repository_installation.yml
when: ceph_origin == 'repository'
- name: update apt cache if cache_valid_time has expired
apt:
update_cache: yes
cache_valid_time: 3600
register: result
until: result is succeeded
- name: install dependencies
apt:
name: "{{ debian_package_dependencies }}"

View File

@ -1,12 +0,0 @@
---
- name: include configure_redhat_repository_installation.yml
include_tasks: configure_redhat_repository_installation.yml
when: ceph_origin == 'repository'
- name: include configure_redhat_local_installation.yml
include_tasks: configure_redhat_local_installation.yml
when: ceph_origin == 'local'
- name: include install_redhat_packages.yml
include_tasks: install_redhat_packages.yml
when: (ceph_origin == 'repository' or ceph_origin == 'distro')

View File

@ -1,7 +0,0 @@
---
- name: include configure_suse_repository_installation.yml
include_tasks: configure_suse_repository_installation.yml
when: ceph_origin == 'repository'
- name: include install_suse_packages.yml
include_tasks: install_suse_packages.yml

View File

@ -1,11 +1,17 @@
---
- name: include_tasks installs/install_on_redhat.yml
include_tasks: installs/install_on_redhat.yml
when: ansible_facts['os_family'] == 'RedHat'
- name: include configure_repository.yml
include_tasks: configure_repository.yml
tags: package-configure
- name: include installs/install_redhat_packages.yml
include_tasks: installs/install_redhat_packages.yml
when:
- ansible_facts['os_family'] == 'RedHat'
- (ceph_origin == 'repository' or ceph_origin == 'distro')
tags: package-install
- name: include_tasks installs/install_on_suse.yml
include_tasks: installs/install_on_suse.yml
- name: include installs/install_suse_packages.yml
include_tasks: installs/install_suse_packages.yml
when: ansible_facts['os_family'] == 'Suse'
tags: package-install