|
|
TASK [prechecks : include_tasks] *****************************************************************************************************************************************/ J& Y7 I# D; O5 C6 h" {# H
included: /usr/local/share/kolla-ansible/ansible/roles/prechecks/tasks/host_os_checks.yml for compute1, controller, localhost: Y* \& @/ L& F. ?7 \
( n) U3 s1 M: z& j) F6 s
TASK [prechecks : Checking host OS distribution] *************************************************************************************************************************
4 U) s+ ^0 P1 k& b) [/ d) dfatal: [compute1]: FAILED! => {3 n8 s7 ]' |1 S8 B5 ?
"assertion": "ansible_facts.distribution in host_os_distributions",! Y' Q4 w/ w: _3 b/ @! x) l
"changed": false,
2 Z l0 F0 t, u4 W# ?: F, J "evaluated_to": false,
1 j4 g( j( @& B "msg": "Host OS distribution openEuler is not supported. Supported distributions are: CentOS, Debian, Rocky, Ubuntu"6 }9 A% g9 [8 \% y$ ]! j
}+ G6 l3 |" [$ _3 M' W# g& W% ~* F
fatal: [controller]: FAILED! => {
+ T& A% {9 R: I0 I% S/ U "assertion": "ansible_facts.distribution in host_os_distributions",( z3 U7 s8 U' ]7 M2 H8 z8 W; A
"changed": false,
; q% ~' R1 e9 X( G7 Q2 f "evaluated_to": false,
0 ?" m1 ^$ n, I "msg": "Host OS distribution openEuler is not supported. Supported distributions are: CentOS, Debian, Rocky, Ubuntu"' w, I2 C- B* E" z/ L3 J) \
}; w" g& z5 b6 _+ b3 U- @: I5 k& k
fatal: [localhost]: FAILED! => {) j% C q5 D I5 _: w; T2 g2 V
"assertion": "ansible_facts.distribution in host_os_distributions",% w" N: @* c2 k$ P* O
"changed": false,2 @! F0 R+ J ]
9 y; t0 t% C; l- } "evaluated_to": false,% {; T7 u# \% e% t! W
"msg": "Host OS distribution openEuler is not supported. Supported distributions are: CentOS, Debian, Rocky, Ubuntu") j- y2 S. W, h6 M0 ?: q8 K" ^
}9 U8 C( \6 d' q2 I" F* `7 I+ q$ @
& ?) m) P W- E0 `PLAY RECAP ***************************************************************************************************************************************************************
5 n9 o* ?) |6 e2 K0 ]compute1 : ok=6 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
( Z/ D3 y" }* i t' e4 |6 j7 dcontroller : ok=6 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 3 v9 x6 L7 f A4 c2 w; z
localhost : ok=6 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 # Z. i6 m: Q* M6 o
- W+ j# ~. q2 U8 i' H: U% B) J! v2 O5 o) E( \) O
解决办法:4 [% Q* w/ J! n) O0 m6 {! a
1 b2 o- @- T+ i. _5 t+ j
vim /usr/local/share/kolla-ansible/ansible/roles/prechecks/tasks/host_os_checks.yml
9 l L! f. z2 R6 H2 K$ n注释掉os检查:
5 {' n; B" T9 ?: Y, @% {
. p, h3 N6 n" u* e( R- C---
' t U! @ t1 W/ V6 B5 ?5 x G#- name: Checking host OS distribution6 D: `+ b* a' u( J r
# assert:, y# @% U+ n6 p7 Y
# that: ansible_facts.distribution in host_os_distributions# A2 x+ z0 X5 v
# fail_msg: >-
; N8 U( t1 R1 N6 q# Host OS distribution {{ ansible_facts.distribution }} is not supported.
) Y. Y% c9 W& k: j5 n5 S/ k0 P% r# Supported distributions are: {{ host_os_distributions.keys() | join(', ') }}1 s- W" z6 ]) Y: J/ \: ^" ]7 I7 z
#" H( e9 O/ n( E* {4 Y- j8 E
#- name: Checking host OS release or version
7 ~2 A$ S( ~7 C; \: G) y# assert:* r* U4 X% {6 P x- \
# that:6 i' C; _" S' h
# - ansible_facts.distribution_release in host_os_distributions[ansible_facts.distribution] or9 O% i" Z, F3 ^, `
# ansible_facts.distribution_version in host_os_distributions[ansible_facts.distribution] or9 V+ h% l- Z) O$ F
# ansible_facts.distribution_major_version in host_os_distributions[ansible_facts.distribution]
$ ]# |% D7 Q- N) [1 B) u# fail_msg: >-$ q& M) h( k( w) W
# {{ ansible_facts.distribution }} release {{ ansible_facts.distribution_release }}
% V( ~- T. u! t6 }7 b" H6 P5 Z# version {{ ansible_facts.distribution_version }} is not supported.: S9 m/ X/ ]6 P0 C" l1 Y' @5 B( U" {
# Supported releases are:7 O/ o( _# B6 z5 K$ [( j4 z& K2 S* R6 J
# {{ host_os_distributions[ansible_facts.distribution] | join(', ') }}
4 P8 Z4 J" e, f+ Q$ [- z#
_2 l9 q, Q% p$ j#- name: Checking if CentOS is Stream5 B! N2 j) q; W
# become: true, y# y+ o5 x2 o" M- k; F
# command: grep -q Stream /etc/os-release! W- x1 U: I! x7 Y6 Z
# register: stream_status: T: w9 [* A' Q9 U1 V! b* O: y+ b2 e
# changed_when: false
/ z9 k% |- c" V* ]) \# check_mode: false$ y% ~# x# b3 H) @8 E* _, A
# when:- d2 s- S- [7 l9 k! U9 m& g
# - ansible_facts.distribution == 'CentOS'
6 d* B7 w% {; A2 p% J#
8 X" w0 B" d8 p4 `#- name: Fail if not running on CentOS Stream
. F5 S+ m0 c7 V4 n' X# ?# fail:, \4 U6 b. |' v7 u0 V5 }* [' h
# msg: CentOS Linux is not supported, you need to run CentOS Stream.
; O; ~/ n5 M) m$ Y# when:
# |, ~$ c/ @, s6 X D' R# - ansible_facts.distribution == 'CentOS'
( C1 [" ^' I6 O1 {9 J1 X' z) `/ l# - stream_status.rc != 0
( g0 ^+ T: ~& `
. W; a6 g5 m$ T: |5 p9 Y& E3 M% p7 E9 f' v* r
4 _ D6 F8 E4 _$ C/ Q
9 L( Q0 y4 b# x: l0 n) C" {再次执行即可:
! t8 [3 C, x* p5 \3 T3 @ A# x& N
" c- v3 L' J7 i' \PLAY RECAP **************************************************************************************************************************************************************
9 r' ^& @+ f% K& E3 ^: Jcompute1 : ok=70 changed=0 unreachable=0 failed=0 skipped=48 rescued=0 ignored=0
" `+ p2 K% H$ ?% G/ w B/ \7 s, ncontroller : ok=102 changed=0 unreachable=0 failed=0 skipped=134 rescued=0 ignored=0 0 i& m' V% n# \6 X
localhost : ok=11 changed=0 unreachable=0 failed=0 skipped=12 rescued=0 ignored=0
. \& y4 Y) K$ Z! Z( n( b- J8 V; |* m8 ?
7 ~$ F8 L5 B; g, ]: q
) B# v) ^0 l3 k, {: Z
( s8 f0 w6 J, k4 H
3 V' o1 d, j2 Q; H; y4 }3 B; n$ \- ~, X. G" B. Z
+ h) C7 w0 b; x) ]. _
|
|