どんな動きになるかのテストメモです
[code lang=text]
astelnoMacBook-Pro% cat roles/test/tasks/main.yml
name: test no tag shell: echo ok
name: test deploy shell: echo ok tags: deploy
name: test deploy logback shell: echo ok tags:
- deploy
- logback astelnoMacBook-Pro% [/code]
[code lang=text] astelnoMacBook-Pro% ansible-playbook -i inventory/vagrant astel.yml -ltest_server
PLAY [all] *********************************************************************
TASK [setup] ******************************************************************* ok: [192.168.122.11]
TASK [test : test no tag] ****************************************************** changed: [192.168.122.11]
TASK [test : test logback] ***************************************************** changed: [192.168.122.11]
TASK [test : test deploy] ****************************************************** changed: [192.168.122.11]
TASK [test : test deploy logback] ********************************************** changed: [192.168.122.11]
PLAY RECAP ********************************************************************* 192.168.122.11 : ok=5 changed=4 unreachable=0 failed=0
astelnoMacBook-Pro% astelnoMacBook-Pro% astelnoMacBook-Pro% astelnoMacBook-Pro% astelnoMacBook-Pro% ansible-playbook -i inventory/vagrant astel.yml -ltest_server -t deploy
PLAY [all] *********************************************************************
TASK [setup] ******************************************************************* ok: [192.168.122.11]
TASK [test : test deploy] ****************************************************** changed: [192.168.122.11]
TASK [test : test deploy logback] ********************************************** changed: [192.168.122.11]
PLAY RECAP ********************************************************************* 192.168.122.11 : ok=3 changed=2 unreachable=0 failed=0
astelnoMacBook-Pro% astelnoMacBook-Pro% astelnoMacBook-Pro% ansible-playbook -i inventory/vagrant astel.yml -ltest_server -t logback
PLAY [all] *********************************************************************
TASK [setup] ******************************************************************* ok: [192.168.122.11]
TASK [test : test logback] ***************************************************** changed: [192.168.122.11]
TASK [test : test deploy logback] ********************************************** changed: [192.168.122.11]
PLAY RECAP ********************************************************************* 192.168.122.11 : ok=3 changed=2 unreachable=0 failed=0
astelnoMacBook-Pro% astelnoMacBook-Pro% astelnoMacBook-Pro% astelnoMacBook-Pro% ansible-playbook -i inventory/vagrant astel.yml -ltest_server -t deploy,logback
PLAY [all] *********************************************************************
TASK [setup] ******************************************************************* ok: [192.168.122.11]
TASK [test : test logback] ***************************************************** changed: [192.168.122.11]
TASK [test : test deploy] ****************************************************** changed: [192.168.122.11]
TASK [test : test deploy logback] ********************************************** changed: [192.168.122.11]
PLAY RECAP ********************************************************************* 192.168.122.11 : ok=4 changed=3 unreachable=0 failed=0
astelnoMacBook-Pro% astelnoMacBook-Pro%
[/code]