Skip to content

Commit

Permalink
changed to include_tasks from import_task for OS specific tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
0lzi committed Jul 1, 2024
1 parent 43cfdf4 commit 83e0c42
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
21 changes: 10 additions & 11 deletions cephadm-preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,20 @@
- ceph-radosgw
- rbd-mirror
tasks:
- name: import_role ceph_defaults
- name: Import_role ceph_defaults
import_role:
name: ceph_defaults

- name: redhat family of OS related tasks
when: ansible_facts['os_family'] == 'RedHat'
import_tasks: tasks/redhat.yml
- name: Import specific OS-related tasks
include_tasks: "{{ lookup('first_found', __OS_distribution) }}"
vars:
__OS_distribution:
files:
- "tasks/{{ ansible_facts['distribution'] }}.yml"
paths:
- "{{ playbook_dir }}"
skip: true

- name: Ubuntu related tasks
when: ansible_facts['distribution'] == 'Ubuntu'
import_tasks: tasks/ubuntu.yml

- name: Debain related tasks
when: ansible_facts['distribution'] == 'Debian'
import_tasks: tasks/debian.yml

- name: set insecure container registry in /etc/containers/registries.conf
ansible.builtin.import_playbook: cephadm-set-container-insecure-registries.yml
Expand Down
1 change: 1 addition & 0 deletions tasks/Centos.yml
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 83e0c42

Please sign in to comment.