Ansible 如何發送 notification 到 HipChat?
17. Ansible 如何發送 notification 到 HipChat?
hipchat module 是什麼?
Ansible 怎麼整合 HipChat?
$ vi send_notification_to_hipchat.yml --- - name: Send notification to HipChat hosts: localhost vars: hipchat_token: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' hipchat_room: "automate-with-ansible" post_tasks: - name: send notification to hipchat hipchat: api: "https://api.hipchat.com/v2/" token: "{{ hipchat_token }}" room: "{{ hipchat_room }}" color: gray msg: "Send a notification with Ansible !" # vim: ft=yaml.ansible :
2016-12-17-ansible-hipchat-1.png 
2016-12-17-ansible-hipchat-2.png 
2016-12-17-ansible-hipchat-3.png 
2016-12-17-ansible-hipchat-4.png 
2016-12-17-ansible-hipchat-5.png 
2016-12-17-ansible-hipchat-6.png 
2016-12-17-ansible-hipchat-7.png 
2016-12-17-ansible-hipchat-8.png $ ansible-playbook send_notification_to_hipchat.yml PLAY [Send notification to HipChat] ******************************** TASK [setup] ******************************************************* ok: [localhost] TASK [send notification to hipchat] ******************************** changed: [localhost] PLAY RECAP ********************************************************* localhost : ok=2 changed=1 unreachable=0 failed=0
2016-12-17-ansible-hipchat-9.png
後語
相關連結
Last updated
