Ansible Lint 尾随 space
Ansible Lint trailing space
我已经对下面的 yml 代码执行了 ansible lint 检查,即使没有尾随空格,我也收到了尾随空格警告,提示已给出缩进。你能就如何克服这个问题提出建议吗
---
- hosts: localhost
gather_facts: false
tasks:
- block:
- name: Which python is running
command: "which python"
register: result
- name: Debug
debug: var=result.stdout
ansible-lint test.yml
[201] Trailing whitespace
test.yml:1
---
[201] Trailing whitespace
test.yml:2
- hosts: localhost
[201] Trailing whitespace
test.yml:3
gather_facts: false
每一行依此类推
我已经对下面的 yml 代码执行了 ansible lint 检查,即使没有尾随空格,我也收到了尾随空格警告,提示已给出缩进。你能就如何克服这个问题提出建议吗
---
- hosts: localhost
gather_facts: false
tasks:
- block:
- name: Which python is running
command: "which python"
register: result
- name: Debug
debug: var=result.stdout
ansible-lint test.yml
[201] Trailing whitespace
test.yml:1
---
[201] Trailing whitespace
test.yml:2
- hosts: localhost
[201] Trailing whitespace
test.yml:3
gather_facts: false
每一行依此类推