易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 5|回复: 0
收起左侧

TASK [prechecks : Checking host OS distribution] 解决办法

[复制链接]
发表于 2025-10-13 00:29:30 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
TASK [prechecks : include_tasks] *****************************************************************************************************************************************
) _& I0 E! o9 r' O- f# H) uincluded: /usr/local/share/kolla-ansible/ansible/roles/prechecks/tasks/host_os_checks.yml for compute1, controller, localhost/ O; O+ z3 X1 U/ J& o
3 I" I/ i' M# \* t( [0 W& d# H9 P6 s
TASK [prechecks : Checking host OS distribution] *************************************************************************************************************************
6 _! C( Q: p! bfatal: [compute1]: FAILED! => {3 |. ?/ n( ]+ Q  d
    "assertion": "ansible_facts.distribution in host_os_distributions",) w7 @7 z# `8 _/ a0 H0 E6 U& {& K$ i, p
    "changed": false,, j1 i3 o6 j$ ]4 {
    "evaluated_to": false,% F( {0 Y6 z% H# F
    "msg": "Host OS distribution openEuler is not supported. Supported distributions are: CentOS, Debian, Rocky, Ubuntu"
( i& I0 g7 g: ]" C6 Z}
: Q8 Q, L2 F7 s: ^fatal: [controller]: FAILED! => {
/ I, d2 E3 l: S, \1 z* J    "assertion": "ansible_facts.distribution in host_os_distributions",; A. g  d* ~: O7 N; _
    "changed": false,: |1 ]) G* m+ K' c2 e, v
    "evaluated_to": false,
# L7 C, W9 Z3 C  ]    "msg": "Host OS distribution openEuler is not supported. Supported distributions are: CentOS, Debian, Rocky, Ubuntu"
9 e; j( S6 s3 T' [! h}
' `# t9 _7 w/ a  Yfatal: [localhost]: FAILED! => {
5 ]( e" r  V; D1 J; n    "assertion": "ansible_facts.distribution in host_os_distributions",
/ N+ K9 E$ [9 }$ S3 b6 m+ o    "changed": false,
* s- B4 {4 M7 q, V; G' P, @1 Y/ [8 W" ~" W
    "evaluated_to": false,
7 j  E" E% r- |    "msg": "Host OS distribution openEuler is not supported. Supported distributions are: CentOS, Debian, Rocky, Ubuntu"! E- f2 g! P5 F9 ~0 u# Y' x' y
}
1 w- U" G5 H0 r$ E# f9 Z: n
1 Z( x1 ~2 g" |+ j. T+ `PLAY RECAP ***************************************************************************************************************************************************************
  z! }. p* b" k; d, n- X  K3 pcompute1                   : ok=6    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   
, U+ T, |" \. u% Jcontroller                 : ok=6    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   
( g' @. J& v5 x& ?localhost                  : ok=6    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   
% P' `8 W5 e. b' }+ [$ t6 k' o2 w! [
5 b* A8 W# g/ A* d" u
解决办法:
( e2 n2 u; u5 p' F& d3 S4 c
( ^  ~% B& P1 M/ M9 S1 e7 Y! z vim /usr/local/share/kolla-ansible/ansible/roles/prechecks/tasks/host_os_checks.yml+ V- h" J' t, d0 J' c  I, Y
注释掉os检查:
1 E4 V' T( c: I- y1 R4 R0 ~* t5 h( L1 Q9 ~
---
8 K) g2 c. \8 i, y( b& Y#- name: Checking host OS distribution
- I/ y6 j/ A  H9 D3 j& v  a#  assert:" l' }+ _5 ~2 R/ O
#    that: ansible_facts.distribution in host_os_distributions+ ?1 S1 ^9 N9 o4 n/ n
#    fail_msg: >-
0 m0 C7 X9 P- z- C#      Host OS distribution {{ ansible_facts.distribution }} is not supported.4 M# h7 l- Z8 ^$ _5 A
#      Supported distributions are: {{ host_os_distributions.keys() | join(', ') }}
3 i# E- G! q& ~4 ^#4 v# p& C6 j; D% N- E3 @5 b' n
#- name: Checking host OS release or version
8 s9 y9 L! \4 b2 N6 B#  assert:- T- Y2 W+ Y1 n" ?) m* I# M$ E9 b
#    that:
" _6 E% L# E1 X7 I6 _#      - ansible_facts.distribution_release in host_os_distributions[ansible_facts.distribution] or
- b3 p4 p* T9 U. L) _  Q; M5 I9 M#        ansible_facts.distribution_version in host_os_distributions[ansible_facts.distribution] or
( U0 E3 H0 ^/ S9 _6 K' V5 u#        ansible_facts.distribution_major_version in host_os_distributions[ansible_facts.distribution]' K( y  ^& Z- s4 `
#    fail_msg: >-7 B. s* \: T) o/ I  l& n8 g  _
#      {{ ansible_facts.distribution }} release {{ ansible_facts.distribution_release }}
) [, p# Z8 n+ A3 N#      version {{ ansible_facts.distribution_version }} is not supported.( ^& A2 Z; d) @
#      Supported releases are:  ]( o9 N9 L+ W8 U5 I' k* p
#      {{ host_os_distributions[ansible_facts.distribution] | join(', ') }}9 g9 T0 i3 t, Y3 p- E
#! o7 o6 i; x8 z/ m* I0 y
#- name: Checking if CentOS is Stream4 B- P+ W  s& s/ G; `
#  become: true
9 ?2 y6 d& k) T4 S#  command: grep -q Stream /etc/os-release& z6 s. R4 X9 W1 ?- X: ^
#  register: stream_status
( V5 M0 G8 l: f3 W#  changed_when: false
3 F. e" P; c: u#  check_mode: false
# n# b7 B6 m8 P' W& ?#  when:1 ~1 t7 }3 n" I
#    - ansible_facts.distribution == 'CentOS'( H7 }) V1 O" e" R7 G8 x) d
#
3 u3 ^" N" W, h' b0 s; D% ?#- name: Fail if not running on CentOS Stream4 Q: K2 R8 M* [9 I. ~
#  fail:& j) D+ d1 Y- W- w
#    msg: CentOS Linux is not supported, you need to run CentOS Stream.
, q6 I1 D8 ?* u6 h#  when:
" T( G- c. c  {8 f' [1 \1 Y# D#    - ansible_facts.distribution == 'CentOS'$ }2 z# v8 a1 ]+ W" |
#    - stream_status.rc != 0
1 i0 H, K% g# z3 |/ F) d
: b- O) q( j2 H2 C4 n& R! y' `. C& g- z- A# Y  S; b
1 @$ G/ ^; G9 k8 N; e0 g1 L3 v. [
- b# X' c. ?/ u& z
再次执行即可:% j+ a! S) u) K+ x/ F" O% u
  v4 P5 P: \0 L$ r% y; ?
PLAY RECAP **************************************************************************************************************************************************************
5 Q! n7 Q6 a0 W- U0 T4 hcompute1                   : ok=70   changed=0    unreachable=0    failed=0    skipped=48   rescued=0    ignored=0   ' D# W4 G& W8 b$ ?- ^9 Z  b
controller                 : ok=102  changed=0    unreachable=0    failed=0    skipped=134  rescued=0    ignored=0   
# l5 W( E4 Z; o4 y) l2 F$ ~  W7 }localhost                  : ok=11   changed=0    unreachable=0    failed=0    skipped=12   rescued=0    ignored=0     J7 d. P6 A9 l/ |" ]+ J
# L3 O0 U; G4 {) ?' d+ A

' i) D# d& }- m+ e% a0 h
) R- H+ B1 |" g7 l" i$ T
' Y: P$ N3 f' u( }+ N4 W. I- r1 K; V

6 j2 W. |" U$ q" Y1 q7 o5 N; a; N9 F/ p$ |
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )点击这里给我发消息

GMT+8, 2026-4-8 19:52 , Processed in 0.047777 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

快速回复 返回顶部 返回列表