joelin109 / blog

0 stars 0 forks source link

Ops - Ansible: Common command for tasks #14

Open joelin109 opened 7 years ago

joelin109 commented 7 years ago

vars

    LocalPath: "/Volumes/Mac-TBD/Server/Python/server-api-py"


tasks

src: 是指该yml文件对应的路径 (本地)

<br>

- file

create a directory if it doesn't exist

joelin109 commented 7 years ago

ansible-playbook sample-playbook.yml

joelin109 commented 7 years ago
service: name=nginx state=started enabled=yes
-"Unable to start service nginx: Job for nginx.service failed because the control process 
exited with error code. See \"systemctl status nginx.service\"