ansible tricky

playbook eample : 

 

the beleow is right one,

we can not add "-" befor "shell" of line

---
- hosts: home1
  vars:
    http_port: 80
  tasks:
  - name: test of shell
    shell:  ls /etc > /etc/ansible/hello.log

 

登录后才可评论.