首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用角色和任务执行角色

使用角色和任务执行角色
EN

Stack Overflow用户
提问于 2021-05-27 12:33:12
回答 1查看 34关注 0票数 0

我有下一本攻略

代码语言:javascript
复制
---
- hosts:grupo1
  tasks:
    - name: Print a message
      ansible.builtin.debug:
        msg: "this task runs before the example role"

    - name: Include the example role
      include_role:
        name: inicializar

    - name: Print a message
      ansible.builtin.debug:
        msg: "this task runs after the example role"
...

每次启动它(ansible-playbook UUAA/ECDY/playbooks/CIR_TIBCO_EI_PP_PR_MASTER.yml --extra-var "entorno=DESARROLLO build=1.2.3.4")时,我都会收到以下错误:

代码语言:javascript
复制
ERROR! We were unable to read either as JSON nor YAML, these are the errors we got from each: JSON: Expecting value: line 1 column 1 (char 0)

Syntax Error while loading YAML. mapping values are not allowed in this context

该错误似乎位于'/home/javi/UUAA/ECDY/playbooks/CIR_TIBCO_EI_PP_PR_MASTER.yml':的第3行、第8列,但也可能位于文件中的其他位置,具体取决于确切的语法问题。

令人不快的行看起来是:

主机:Grupo1任务:^此处

你知道什么是问题吗?

EN

回答 1

Stack Overflow用户

发布于 2021-05-27 14:54:18

键和值之间缺少空格。修好它

代码语言:javascript
复制
- hosts: grupo1
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67715721

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档