Ansible 使用角色和任务执行角色
我有下一个剧本Ansible 使用角色和任务执行角色,ansible,Ansible,我有下一个剧本 --- - 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 - na
---
- 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=desarrolo build=1.2.3.4”
),我都会遇到以下错误:
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列,但可能在文件的其他位置,具体取决于语法问题
令人不快的一行似乎是:
主机:GRUP1任务:^此处
知道什么是worong吗?键和值之间缺少空格。修好它
-主机:grupo1