Skip to content

Instantly share code, notes, and snippets.

@kaz-tk
Created February 11, 2015 10:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaz-tk/8a8cbaf66934e175d0c3 to your computer and use it in GitHub Desktop.
Save kaz-tk/8a8cbaf66934e175d0c3 to your computer and use it in GitHub Desktop.
ansible v2 block
- name: ansible v2 の新機能を試してみよう
gather_facts: False
tasks:
- block:
- debug: msg='try相当'
- action: debug msg=block1_play1
- action: debug msg=block1_play2
- command: /bin/false
- debug: msg='ここには到達しない'
rescue:
- debug: msg='回復処理/切り戻し/except,catch相当'
- command: /bin/false
- debug: msg='ここには到達しない'
always:
- debug: msg="finally相当"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment