小编orj*_*orj的帖子

Ansible - playbook:确保您的变量名称不包含无效字符,例如“-”

我正在使用 ansible 版本 2.1.0.0,我的部分代码是:

- shell: /etc/init.d/named restart
  when: ('FAILED' not in zoneconfig.stdout) and ('neither' not in zoneconfig.stdout) and ('FAILED' not in echofail.stdout) and ('SUCCESSFUL' in echopass.stdout_lines) and ('SUCCESSFUL' in zoneconfig.stdout)
  ignore_errors: True
  register: namedrestart
- debug: var=namedrestart.stdout_lines
  when: ('FAILED' not in zoneconfig.stdout) and ('neither' not in zoneconfig.stdout) and ('FAILED' not in echofail.stdout) and ('SUCCESSFUL' in echopass.stdout_lines) and ('SUCCESSFUL' in zoneconfig.stdout)
  ignore_errors: True

- shell: /etc/init.d/named status
  when: ('FAILED' not in zoneconfig.stdout) and ('neither' not in zoneconfig.stdout) and ('FAILED' not …
Run Code Online (Sandbox Code Playgroud)

ansible

5
推荐指数
1
解决办法
2万
查看次数

标签 统计

ansible ×1