-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
roles: playbooks: vars: use new detect_seapath_distro role
Use the new detect_seapath_distro role to detect the Seapath distribution and conditionally execute distro specific tasks. This replaces the use of the ansible_distribution fact. This fact cannot be used with Yocto Seapath as it depends on the DISTRO_NAME configured during build. This new role sets a seapath_distro fact to use by playbooks and roles. * Replace the use of ansible_distribution in roles by seapath_distro. Also add detect_seapath_distro as requirement for these roles to make sure seapath_distro is always set. * Call the detect_seapath_distro role and use seapath_distro in playbooks needing it. * Rename "Seapath_host_Yocto_distribution.yml" vars files to "Yocto.yml" to match and use seapath_distro. * Modify the ceph-ansible patches to use detect_seapath_distro. Signed-off-by: Elinor Montmasson <[email protected]>
- Loading branch information
Showing
32 changed files
with
74 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,5 @@ galaxy_info: | |
- name: Debian | ||
versions: | ||
- all | ||
dependencies: [] | ||
|
||
dependencies: | ||
- role: detect_seapath_distro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,5 @@ galaxy_info: | |
- name: Debian | ||
versions: | ||
- all | ||
dependencies: [] | ||
dependencies: | ||
- role: detect_seapath_distro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,5 @@ galaxy_info: | |
- name: Debian | ||
versions: | ||
- all | ||
dependencies: [] | ||
dependencies: | ||
- role: detect_seapath_distro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ This role configures OVS | |
|
||
## Requirements | ||
|
||
no requirement. | ||
- detect_seapath_distro | ||
|
||
## Role Variables | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,5 @@ galaxy_info: | |
- name: Debian | ||
versions: | ||
- all | ||
dependencies: [] | ||
dependencies: | ||
- role: detect_seapath_distro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,5 @@ galaxy_info: | |
- name: Debian | ||
versions: | ||
- all | ||
dependencies: [] | ||
dependencies: | ||
- role: detect_seapath_distro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,5 @@ galaxy_info: | |
- name: Debian | ||
versions: | ||
- all | ||
dependencies: [] | ||
dependencies: | ||
- role: detect_seapath_distro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,23 @@ | ||
diff --git a/roles/ceph-osd/meta/main.yml b/roles/ceph-osd/meta/main.yml | ||
index 3c2a26e89..283bae30b 100644 | ||
--- a/roles/ceph-osd/meta/main.yml | ||
+++ b/roles/ceph-osd/meta/main.yml | ||
@@ -11,4 +11,5 @@ galaxy_info: | ||
- 7 | ||
galaxy_tags: | ||
- system | ||
-dependencies: [] | ||
+dependencies: | ||
+ - role: ../../roles/detect_seapath_distro | ||
diff --git a/roles/ceph-osd/tasks/main.yml b/roles/ceph-osd/tasks/main.yml | ||
index 623731ddd..d9e281f2b 100644 | ||
index 623731ddd..e1631dc01 100644 | ||
--- a/roles/ceph-osd/tasks/main.yml | ||
+++ b/roles/ceph-osd/tasks/main.yml | ||
@@ -24,6 +24,7 @@ | ||
when: | ||
- not containerized_deployment | bool | ||
- ansible_facts['os_family'] != 'ClearLinux' | ||
+ - "'Yocto' not in ansible_distribution" | ||
|
||
+ - seapath_distro != "Yocto" | ||
- name: install numactl when needed | ||
package: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,39 @@ | ||
diff --git a/infrastructure-playbooks/purge-cluster.yml b/infrastructure-playbooks/purge-cluster.yml | ||
index 109a25697..29a0c842a 100644 | ||
index 109a25697..3afab0460 100644 | ||
--- a/infrastructure-playbooks/purge-cluster.yml | ||
+++ b/infrastructure-playbooks/purge-cluster.yml | ||
@@ -50,7 +50,7 @@ | ||
- name: check there's no ceph kernel threads present | ||
hosts: clients | ||
@@ -42,6 +42,9 @@ | ||
- mgrs | ||
- monitoring | ||
become: true | ||
- gather_facts: false | ||
+ gather_facts: true | ||
any_errors_fatal: true | ||
+ roles: | ||
+ - detect_seapath_distro | ||
tasks: | ||
- import_role: | ||
@@ -106,6 +106,7 @@ | ||
- debug: | ||
msg: "gather facts on all Ceph hosts for following reference" | ||
@@ -106,6 +109,7 @@ | ||
- rbd | ||
- ceph | ||
- libceph | ||
+ when: "'Yocto' not in ansible_distribution" | ||
+ when: seapath_distro != "Yocto" | ||
|
||
|
||
- name: purge ceph nfs cluster | ||
@@ -545,6 +546,16 @@ | ||
@@ -545,6 +549,16 @@ | ||
when: | ||
- containerized_deployment | bool | ||
or ceph_volume_present.rc == 0 | ||
+ - "'Yocto' not in ansible_distribution" | ||
+ - seapath_distro != "Yocto" | ||
+ | ||
+ - name: Get real path for OSD disk | ||
+ command: "realpath {{ ceph_osd_disk }}" # Get the resolved path of the disk given initially by the "/dev/disk/by-path/" for ceph purposes | ||
+ register: ceph_osd_realdisk | ||
+ when: "'Yocto' in ansible_distribution" | ||
+ when: seapath_distro == "Yocto" | ||
+ | ||
+ - name: Cleanup Ceph OSD disks with ceph-volume | ||
+ command: "ceph-volume lvm zap {{ ceph_osd_realdisk.stdout }} --destroy" | ||
+ when: "'Yocto' in ansible_distribution" | ||
+ when: seapath_distro == "Yocto" | ||
|
||
- name: get ceph block partitions | ||
shell: | |
File renamed without changes.