I have three different environments: test, staging, and prod and 3 applications that I deploy to them.
In staging and prod, each application have a dedicated server. In test, they all will be deployed to the same box.
↪ ansible-playbook -i inv/test/hosts playbook.yml --private-key vagrant/.vagrant/machines/default/virtualbox/private_key -vv 12:45:01
ansible-playbook 2.5.3
config file = /Users/behrang/ansible/ansible.cfg
configured module search path = [u'/Users/behrang/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/Cellar/ansible/2.5.3/libexec/lib/python2.7/site-packages/ansible
executable location = /usr/local/bin/ansible-playbook
python version = 2.7.15 (default, May 1 2018, 16:44:14) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)]
Using /Users/behrang/ansible/ansible.cfg as config file
PLAYBOOK: playbook.yml *****************************************************************************************************************************************
3 plays in playbook.yml
PLAY [timesheets] **********************************************************************************************************************************************
TASK [Gathering Facts] *****************************************************************************************************************************************
task path: /Users/behrang/ansible/playbook.yml:2
ok: [test.vagrant.local]
META: ran handlers
TASK [sensu-check-role : Create checks directory] **************************************************************************************************************
task path: /Users/behrang/ansible/roles/sensu-check-role/tasks/main.yml:2
ok: [test.vagrant.local] => {"changed": false, "gid": 0, "group": "root", "mode": "0755", "owner": "root", "path": "/etc/sensu/conf.d/checks/", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 4096, "state": "directory", "uid": 0}
TASK [sensu-check-role : Uninstall redundant checks] ***********************************************************************************************************
task path: /Users/behrang/ansible/roles/sensu-check-role/tasks/main.yml:7
ok: [test.vagrant.local] => (item={u'basename': u'check-legacy-process'}) => {"changed": false, "item": {"basename": "check-legacy-process"}, "path": "/etc/sensu/conf.d/checks//check-legacy-process.json", "state": "absent"}
TASK [sensu-check-role : Compile checks] ***********************************************************************************************************************
task path: /Users/behrang/ansible/roles/sensu-check-role/tasks/main.yml:13
ok: [test.vagrant.local] => (item={u'command': u'/etc/sensu/plugins/community/check-procs.rb -c 1 -p java.*timesheets', u'name': u'check-timesheets-process'}) => {"ansible_facts": {"check_def": {"name": "check-timesheets-process"}}, "changed": false, "item": {"command": "/etc/sensu/plugins/community/check-procs.rb -c 1 -p java.*timesheets", "name": "check-timesheets-process"}}
TASK [sensu-check-role : Copy checks] **************************************************************************************************************************
task path: /Users/behrang/ansible/roles/sensu-check-role/tasks/main.yml:19
ok: [test.vagrant.local] => (item={'changed': False, '_ansible_no_log': False, 'failed': False, '_ansible_item_result': True, 'item': {u'command': u'/etc/sensu/plugins/community/check-procs.rb -c 1 -p java.*timesheets', u'name': u'check-timesheets-process'}, 'ansible_facts': {u'check_def': {'name': u'check-timesheets-process'}}, '_ansible_ignore_errors': None}) => {"changed": false, "checksum": "4dcc6d84ebf99973919d7676991e2ba2cc5f8736", "dest": "/etc/sensu/conf.d/checks//check-timesheets-process.json", "gid": 0, "group": "root", "item": {"ansible_facts": {"check_def": {"name": "check-timesheets-process"}}, "changed": false, "failed": false, "item": {"command": "/etc/sensu/plugins/community/check-procs.rb -c 1 -p java.*timesheets", "name": "check-timesheets-process"}}, "mode": "0644", "owner": "root", "path": "/etc/sensu/conf.d/checks//check-timesheets-process.json", "secontext": "system_u:object_r:etc_t:s0", "size": 36, "state": "file", "uid": 0}
META: ran handlers
META: ran handlers
PLAY [accounting] **********************************************************************************************************************************************
TASK [Gathering Facts] *****************************************************************************************************************************************
task path: /Users/behrang/ansible/playbook.yml:9
ok: [test.vagrant.local]
META: ran handlers
TASK [sensu-check-role : Create checks directory] **************************************************************************************************************
task path: /Users/behrang/ansible/roles/sensu-check-role/tasks/main.yml:2
ok: [test.vagrant.local] => {"changed": false, "gid": 0, "group": "root", "mode": "0755", "owner": "root", "path": "/etc/sensu/conf.d/checks/", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 4096, "state": "directory", "uid": 0}
TASK [sensu-check-role : Uninstall redundant checks] ***********************************************************************************************************
task path: /Users/behrang/ansible/roles/sensu-check-role/tasks/main.yml:7
ok: [test.vagrant.local] => (item={u'basename': u'check-legacy-process'}) => {"changed": false, "item": {"basename": "check-legacy-process"}, "path": "/etc/sensu/conf.d/checks//check-legacy-process.json", "state": "absent"}
TASK [sensu-check-role : Compile checks] ***********************************************************************************************************************
task path: /Users/behrang/ansible/roles/sensu-check-role/tasks/main.yml:13
ok: [test.vagrant.local] => (item={u'command': u'/etc/sensu/plugins/community/check-procs.rb -c 1 -p java.*timesheets', u'name': u'check-timesheets-process'}) => {"ansible_facts": {"check_def": {"name": "check-timesheets-process"}}, "changed": false, "item": {"command": "/etc/sensu/plugins/community/check-procs.rb -c 1 -p java.*timesheets", "name": "check-timesheets-process"}}
TASK [sensu-check-role : Copy checks] **************************************************************************************************************************
task path: /Users/behrang/ansible/roles/sensu-check-role/tasks/main.yml:19
ok: [test.vagrant.local] => (item={'changed': False, '_ansible_no_log': False, 'failed': False, '_ansible_item_result': True, 'item': {u'command': u'/etc/sensu/plugins/community/check-procs.rb -c 1 -p java.*timesheets', u'name': u'check-timesheets-process'}, 'ansible_facts': {u'check_def': {'name': u'check-timesheets-process'}}, '_ansible_ignore_errors': None}) => {"changed": false, "checksum": "4dcc6d84ebf99973919d7676991e2ba2cc5f8736", "dest": "/etc/sensu/conf.d/checks//check-timesheets-process.json", "gid": 0, "group": "root", "item": {"ansible_facts": {"check_def": {"name": "check-timesheets-process"}}, "changed": false, "failed": false, "item": {"command": "/etc/sensu/plugins/community/check-procs.rb -c 1 -p java.*timesheets", "name": "check-timesheets-process"}}, "mode": "0644", "owner": "root", "path": "/etc/sensu/conf.d/checks//check-timesheets-process.json", "secontext": "system_u:object_r:etc_t:s0", "size": 36, "state": "file", "uid": 0}
META: ran handlers
META: ran handlers
PLAY [payroll] *************************************************************************************************************************************************
TASK [Gathering Facts] *****************************************************************************************************************************************
task path: /Users/behrang/ansible/playbook.yml:16
ok: [test.vagrant.local]
META: ran handlers
TASK [sensu-check-role : Create checks directory] **************************************************************************************************************
task path: /Users/behrang/ansible/roles/sensu-check-role/tasks/main.yml:2
ok: [test.vagrant.local] => {"changed": false, "gid": 0, "group": "root", "mode": "0755", "owner": "root", "path": "/etc/sensu/conf.d/checks/", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 4096, "state": "directory", "uid": 0}
TASK [sensu-check-role : Uninstall redundant checks] ***********************************************************************************************************
task path: /Users/behrang/ansible/roles/sensu-check-role/tasks/main.yml:7
ok: [test.vagrant.local] => (item={u'basename': u'check-legacy-process'}) => {"changed": false, "item": {"basename": "check-legacy-process"}, "path": "/etc/sensu/conf.d/checks//check-legacy-process.json", "state": "absent"}
TASK [sensu-check-role : Compile checks] ***********************************************************************************************************************
task path: /Users/behrang/ansible/roles/sensu-check-role/tasks/main.yml:13
ok: [test.vagrant.local] => (item={u'command': u'/etc/sensu/plugins/community/check-procs.rb -c 1 -p java.*timesheets', u'name': u'check-timesheets-process'}) => {"ansible_facts": {"check_def": {"name": "check-timesheets-process"}}, "changed": false, "item": {"command": "/etc/sensu/plugins/community/check-procs.rb -c 1 -p java.*timesheets", "name": "check-timesheets-process"}}
TASK [sensu-check-role : Copy checks] **************************************************************************************************************************
task path: /Users/behrang/ansible/roles/sensu-check-role/tasks/main.yml:19
ok: [test.vagrant.local] => (item={'changed': False, '_ansible_no_log': False, 'failed': False, '_ansible_item_result': True, 'item': {u'command': u'/etc/sensu/plugins/community/check-procs.rb -c 1 -p java.*timesheets', u'name': u'check-timesheets-process'}, 'ansible_facts': {u'check_def': {'name': u'check-timesheets-process'}}, '_ansible_ignore_errors': None}) => {"changed": false, "checksum": "4dcc6d84ebf99973919d7676991e2ba2cc5f8736", "dest": "/etc/sensu/conf.d/checks//check-timesheets-process.json", "gid": 0, "group": "root", "item": {"ansible_facts": {"check_def": {"name": "check-timesheets-process"}}, "changed": false, "failed": false, "item": {"command": "/etc/sensu/plugins/community/check-procs.rb -c 1 -p java.*timesheets", "name": "check-timesheets-process"}}, "mode": "0644", "owner": "root", "path": "/etc/sensu/conf.d/checks//check-timesheets-process.json", "secontext": "system_u:object_r:etc_t:s0", "size": 36, "state": "file", "uid": 0}
META: ran handlers
META: ran handlers
PLAY RECAP *****************************************************************************************************************************************************
test.vagrant.local : ok=15 changed=0 unreachable=0 failed=0