当前位置: 首页 > news >正文

ansible注意的和错误代码分析

一、需要注意的点

  • 分清楚这个是主控节点还是被控节点的操作,有的时候是一个文件从主控到被控节点,还是被控节点的文件到主控节点上面了

剧本执行报错代码

# 仔细看,报错的原因就是ansibel_lvm 未定义,写错了变量名TASK [research not exsist] *********************************************************************
fatal: [node1]: FAILED! => {"msg": "The conditional check 'ansible_hostname=='node1' and 'research' not in ansibel_lvm.vgs' failed. The error was: error while evaluating conditional (ansible_hostname=='node1' and 'research' not in ansibel_lvm.vgs): 'ansibel_lvm' is undefined. 'ansibel_lvm' is undefined\n\nThe error appears to be in '/home/devops/ansible/yml/lvs.yml': line 20, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n      when: \"ansible_hostname=='node1' and 'research' in ansible_lvm.vgs\"\n    - name: research not exist\n      ^ here\n"}
http://www.gsyq.cn/news/11900.html

相关文章:

  • 用 Rust 和 Tesseract OCR 识别验证码
  • 基于寄存器地址amp;标准外设库的LED流水灯
  • Rust 和 Tesseract OCR 实现验证码识别
  • AI-Powered-ToDo-List
  • Python 在 Web 开发中的应用与趋势
  • LLM MOE的进化之路
  • 【pytorch】关于深度学习模型是怎么使数据从头流动到尾的
  • AtCoder ARC114 总结 (A-C)
  • 日总结 8
  • 完整教程:讲一下ZooKeeper的持久化机制
  • AI变现攻略 - 教程
  • 英语_阅读_A farmer dream_待读
  • docker 私有仓库 harbor
  • Selenium工作原理详解 - 教程
  • 2025秋_3
  • 2025秋_4
  • 【STM32H7】从零开始搭建的HAL库工程模板(基于CubeMX)
  • 详细介绍:ES6核心基础
  • 实用指南:【 GUI自动化测试】GUI自动化测试(一) 环境安装与测试
  • 【JavaEE】MyBatis - Plus - 教程
  • NOI 模拟赛五
  • AI热点周报(09.14~09.20):Gemini集成到Chrome、Claude 强化记忆、Qwen3-Next快捷落地,AI走向集成化,工程化?
  • flask认证机制logging模块实战
  • 代码随想录算法训练营第九天 |151.翻转字符串里的单词、 LCR 182. 动态口令、28. 实现 strStr()、459.重复的子字符串
  • Codeforces Global Round 29 (Div. 1 + Div. 2) A~E
  • 实用指南:【知识拓展Trip Five】寄存器
  • 计算机视觉(opencv)实战二十七——目标跟踪 - 教程
  • 蓝桥杯 2025 省 B 题:画展布置 - 题解笔记
  • 二维坐标下的运算
  • 题解:P12751 [POI 2017 R2] 集装箱 Shipping containers