|
|
TASK [prechecks : include_tasks] *****************************************************************************************************************************************
( W3 n4 \$ m+ v9 H0 z M5 c1 u1 |5 `included: /usr/local/share/kolla-ansible/ansible/roles/prechecks/tasks/host_os_checks.yml for compute1, controller, localhost, `7 u! C# G& W) K8 l% z" o* X
- P. u6 s1 l8 m" W) N( M( qTASK [prechecks : Checking host OS distribution] *************************************************************************************************************************. G9 l$ `0 V' p% d1 H0 Y6 s
fatal: [compute1]: FAILED! => {
# a2 ^6 X8 _* a# e# m ]6 { "assertion": "ansible_facts.distribution in host_os_distributions",
/ W# a% @9 J0 f1 f/ @6 O* ], j "changed": false,
M% D5 D" k* _5 L "evaluated_to": false,
+ R- X4 u9 J0 I1 q" E& }' B "msg": "Host OS distribution openEuler is not supported. Supported distributions are: CentOS, Debian, Rocky, Ubuntu" Q( v. C$ \, [; [0 W( ^* j
}! E+ e: E; P# Q5 F& C
fatal: [controller]: FAILED! => {
- w- E3 b8 h# d/ G% I! [, A, } "assertion": "ansible_facts.distribution in host_os_distributions",
~& U$ {5 \7 D3 y& z6 t+ l "changed": false,) L5 P& g# @% T6 N
"evaluated_to": false,8 w8 `1 q' N: [# o) v
"msg": "Host OS distribution openEuler is not supported. Supported distributions are: CentOS, Debian, Rocky, Ubuntu"& y* Z5 c& d/ b* {1 b
}
5 t# K3 ?: t2 W0 X9 qfatal: [localhost]: FAILED! => {
4 R& @; B. a. j# k% w "assertion": "ansible_facts.distribution in host_os_distributions",9 K; _# o. y7 [* o! b2 R$ A5 `
"changed": false,& W+ t; T% X" D
3 q! t# s; n/ k; L. C "evaluated_to": false,
$ ]) S+ h+ v6 }, V0 n" B+ K "msg": "Host OS distribution openEuler is not supported. Supported distributions are: CentOS, Debian, Rocky, Ubuntu"
" W+ o: Q+ b2 h}; \4 v7 Z( [! D3 f- k6 j8 w; q1 h
4 b& `, I' n1 Z' f5 z+ ^$ Y- I2 aPLAY RECAP ***************************************************************************************************************************************************************
- r F, \1 B% P4 G; F8 R# E" a/ ?compute1 : ok=6 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 + f" D3 M) R% u' K
controller : ok=6 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 : n- I# [: q1 o- n. h
localhost : ok=6 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 * T+ Y- N+ x) V0 v7 t, r. S
" y1 D: b3 |; S! ~3 }* o$ a* Z* L0 G) K2 A" l
解决办法:% ]8 O. `: p( k5 x7 a% ~) y
6 A- G/ Q/ H; q
vim /usr/local/share/kolla-ansible/ansible/roles/prechecks/tasks/host_os_checks.yml
- g* s3 | N, Y注释掉os检查:4 t' Z1 E4 E/ D8 K5 T
; Q" X3 {' o) u: d4 b
---
" l2 V6 r. J' Z#- name: Checking host OS distribution" I9 x: L/ x( U5 s, F
# assert:
: ^* [% w! f- ?0 }, x8 J; @# that: ansible_facts.distribution in host_os_distributions
* y8 J% F/ U( E# fail_msg: >-9 m# D+ B' u/ z9 d: |
# Host OS distribution {{ ansible_facts.distribution }} is not supported.( X8 w, s; k) x. o4 n
# Supported distributions are: {{ host_os_distributions.keys() | join(', ') }}: m4 [8 j8 J, C; ?6 W+ n* |$ m
#! c+ G; k) J, x/ F4 p1 n0 g, R
#- name: Checking host OS release or version
# m' G8 n; a) k0 h( D; v+ I# assert:) `4 a5 m# M9 a+ t- b0 e
# that:
7 {0 W$ C# d9 j# - ansible_facts.distribution_release in host_os_distributions[ansible_facts.distribution] or
! H: C% M! `1 ?( j* g: N$ C# ansible_facts.distribution_version in host_os_distributions[ansible_facts.distribution] or. { X7 L" _; F# j
# ansible_facts.distribution_major_version in host_os_distributions[ansible_facts.distribution]
6 l6 ]. u* Z# p: a1 F2 B# fail_msg: >-
/ i `6 \$ U& G1 @$ R3 p# {{ ansible_facts.distribution }} release {{ ansible_facts.distribution_release }}
' w4 J1 D" J# w$ J3 S5 w# version {{ ansible_facts.distribution_version }} is not supported.
/ z7 r" o' r7 T1 @+ q! ^8 d) B0 T# Supported releases are:" }4 T: }9 h: G9 g7 ]) K- ~ P [
# {{ host_os_distributions[ansible_facts.distribution] | join(', ') }}
) @3 X) y1 p" z2 z$ p#& U; I1 A. n% G9 l, w
#- name: Checking if CentOS is Stream
8 ^" f) X" ]3 `3 f# become: true e8 }- y% ?$ R
# command: grep -q Stream /etc/os-release C7 I6 r, D: r# Y1 Q9 H) W0 j
# register: stream_status. v! ^! }7 @# _" t1 d! U. u3 [; j
# changed_when: false
8 I+ ^4 j0 U/ X8 Y2 p# check_mode: false' ` }) }6 P0 N
# when:
; N; P$ o9 p2 ~3 c. \; @) |# - ansible_facts.distribution == 'CentOS'- Z$ W' e! f/ r9 }7 }5 A+ S
#' }4 M: c0 V2 i- |
#- name: Fail if not running on CentOS Stream' L0 e! C0 N' o' P. d" X
# fail:
% h$ m+ E8 R* N% F3 O6 L: M# msg: CentOS Linux is not supported, you need to run CentOS Stream.
/ T. E' k& E* C5 d# when:
8 \$ X7 | h+ l# - ansible_facts.distribution == 'CentOS'0 X# F- L$ Z3 q5 h. P: L
# - stream_status.rc != 0& g# Z% A; R4 `5 ~3 ^
; b. F3 V# x% |6 Z
; g) S- Z/ S0 i( Q0 D$ z, ~4 y- h
' R& _, u$ u. l2 c& m4 n, _% V$ c$ z& ~
再次执行即可:, g7 g9 g. m, A! g2 |4 r0 |
/ V7 V, O, N: T. H$ g' Z5 _+ s/ Q
PLAY RECAP **************************************************************************************************************************************************************
- Y( C g. u: X. @ v$ b0 fcompute1 : ok=70 changed=0 unreachable=0 failed=0 skipped=48 rescued=0 ignored=0 0 g& c3 d& g2 H( f/ S6 W
controller : ok=102 changed=0 unreachable=0 failed=0 skipped=134 rescued=0 ignored=0
- r: c! N8 O( v3 r+ K5 ~5 Klocalhost : ok=11 changed=0 unreachable=0 failed=0 skipped=12 rescued=0 ignored=0 ) I4 u* j; l* o( e9 m4 m
# W4 p9 s' a. y3 X% x1 \
& [6 O1 \: Q! ]* w- c
[) d/ u' W$ t" G* L9 G1 e* {! ~& d9 v
L8 c6 Q$ M+ e% }
. A ?& D+ s; F: ^1 w% a+ [
2 d4 w( j* |8 z& |5 @( H
|
|