{"action":"closed","issue":{"url":"https://api.github.com/repos/Comcast/ansible-sdkman/issues/23","repository_url":"https://api.github.com/repos/Comcast/ansible-sdkman","labels_url":"https://api.github.com/repos/Comcast/ansible-sdkman/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/Comcast/ansible-sdkman/issues/23/comments","events_url":"https://api.github.com/repos/Comcast/ansible-sdkman/issues/23/events","html_url":"https://github.com/Comcast/ansible-sdkman/issues/23","id":364376126,"node_id":"MDU6SXNzdWUzNjQzNzYxMjY=","number":23,"title":"Playbook run successfully even when failed to install java sdk ","user":{"login":"danielporto","id":1652891,"node_id":"MDQ6VXNlcjE2NTI4OTE=","avatar_url":"https://avatars1.githubusercontent.com/u/1652891?v=4","gravatar_id":"","url":"https://api.github.com/users/danielporto","html_url":"https://github.com/danielporto","followers_url":"https://api.github.com/users/danielporto/followers","following_url":"https://api.github.com/users/danielporto/following{/other_user}","gists_url":"https://api.github.com/users/danielporto/gists{/gist_id}","starred_url":"https://api.github.com/users/danielporto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielporto/subscriptions","organizations_url":"https://api.github.com/users/danielporto/orgs","repos_url":"https://api.github.com/users/danielporto/repos","events_url":"https://api.github.com/users/danielporto/events{/privacy}","received_events_url":"https://api.github.com/users/danielporto/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-27T09:10:22Z","updated_at":"2018-09-27T15:59:22Z","closed_at":"2018-09-27T15:59:22Z","author_association":"NONE","body":"The playbook should fail when trying to install an unavailable version of the SDK. \r\n\r\nI ran a playbook which has an outdated and unavailable version of java sdk (8.0.163-zulu) and couldn't notice the sdk installation problem which I expected to be notified by the ansible role. The playbook completed without warnings or errors as if the installation was done successfully. All other playbooks that require the java sdk failed afterward.\r\n \r\nRunning from a Mac with target system: centos7 latest update baremetal. Python 2.7.\r\ncomcast/ansible-sdkman v1.4.1\r\n\r\nHere is the playbook example:\r\n- hosts: clients_cluster, leader, replicas\r\n  become: no\r\n  any_errors_fatal: true\r\n  vars_files:\r\n      - play-vars-ycsbsmart.yml\r\n\r\n  roles:\r\n    - role: comcast.sdkman\r\n      sdkman_dir: \"{{ sdkman_folder }}\"\r\n      sdkman_auto_answer: true\r\n      sdkman_update: true\r\n      sdkman_install_packages:\r\n        - { candidate: java, version: \"{{ java_version }}\" }  # java_version: '8.0.163-zulu' unavailable\r\n        - { candidate: ant, version: \"{{ ant_version }}\" }\r\n      sdkman_flush_caches_before:\r\n        - temp\r\n      sdkman_flush_caches_after:\r\n        - archives\r\n        - broadcast\r\n        - candidates\r\n        - temp\r\n\r\n  post_tasks:\r\n    - name: Ensure presence of profile\r\n      file: state=touch path=~/.profile\r\n\r\n    - name: Add sdkman in .profile\r\n      lineinfile: \r\n        path: ~/.profile \r\n        regexp: '\\[\\[ \\-s \\\"{{sdkman_folder}}\\/.*'\r\n        line: '[[ -s \"{{sdkman_folder}}/bin/sdkman-init.sh\" && ! $(which sdkman-init.sh) ]] && source \"{{sdkman_folder}}/bin/sdkman-init.sh\"'\r\n\r\n    - name: Add sdkman in .bashrc\r\n      lineinfile: \r\n        path: ~/.bashrc \r\n        regexp: '\\[\\[ \\-s \\\"{{sdkman_folder}}\\/.*'\r\n        line: '[[ -s \"{{sdkman_folder}}/bin/sdkman-init.sh\" && ! $(which sdkman-init.sh) ]] && source \"{{sdkman_folder}}/bin/sdkman-init.sh\"'\r\n\r\n-----\r\nplaybook output:\r\n\r\n\r\nPLAY [clients_cluster, leader, replicas, manager] ***********************************************************************************************************************************************************************************************************************\r\n\r\nTASK [Gathering Facts] **************************************************************************************************************************************************************************************************************************************************\r\nok: [capsulecorp_oc0]\r\n\r\nTASK [Create environment folder] ****************************************************************************************************************************************************************************************************************************************\r\nok: [capsulecorp_oc0] => (item=/home/goku/kaioken/data/wkld_characterization/centos7/ycsb)\r\nok: [capsulecorp_oc0] => (item=/home/goku/kaioken)\r\nok: [capsulecorp_oc0] => (item=/home/goku/kaioken/keys)\r\n\r\nTASK [Copy default tmux] ************************************************************************************************************************************************************************************************************************************************\r\nok: [capsulecorp_oc0]\r\n\r\nTASK [Define that the init tasks was done.] *****************************************************************************************************************************************************************************************************************************\r\nok: [capsulecorp_oc0]\r\n\r\nPLAY [clients_cluster, leader, replicas] ********************************************************************************************************************************************************************************************************************************\r\n\r\nTASK [Gathering Facts] **************************************************************************************************************************************************************************************************************************************************\r\nok: [capsulecorp_oc0]\r\n\r\nTASK [comcast.sdkman : Install SDKMAN] **********************************************************************************************************************************************************************************************************************************\r\nincluded: /Volumes/data/Users/dan/.ansible/roles/comcast.sdkman/tasks/install.yml for capsulecorp_oc0\r\n\r\nTASK [comcast.sdkman : Determine SDKMAN vars] ***************************************************************************************************************************************************************************************************************************\r\nok: [capsulecorp_oc0]\r\n\r\nTASK [comcast.sdkman : Include system vars] *****************************************************************************************************************************************************************************************************************************\r\nok: [capsulecorp_oc0] => (item=/Volumes/data/Users/dan/.ansible/roles/comcast.sdkman/vars/RedHat.yml)\r\n\r\nTASK [comcast.sdkman : Install system packages] *************************************************************************************************************************************************************************************************************************\r\nok: [capsulecorp_oc0] => (item=curl)\r\nok: [capsulecorp_oc0] => (item=findutils)\r\nok: [capsulecorp_oc0] => (item=libselinux-python)\r\nok: [capsulecorp_oc0] => (item=libstdc++)\r\nok: [capsulecorp_oc0] => (item=tar)\r\nok: [capsulecorp_oc0] => (item=unzip)\r\nok: [capsulecorp_oc0] => (item=which)\r\nok: [capsulecorp_oc0] => (item=zip)\r\n\r\nTASK [comcast.sdkman : Install GLIBC for Alpine Linux] ******************************************************************************************************************************************************************************************************************\r\nskipping: [capsulecorp_oc0]\r\n\r\nTASK [comcast.sdkman : Check for SDKMAN installation] *******************************************************************************************************************************************************************************************************************\r\nok: [capsulecorp_oc0]\r\n\r\nTASK [comcast.sdkman : Download SDKMAN] *********************************************************************************************************************************************************************************************************************************\r\nchanged: [capsulecorp_oc0]\r\n\r\nTASK [comcast.sdkman : Run SDKMAN script] *******************************************************************************************************************************************************************************************************************************\r\nchanged: [capsulecorp_oc0]\r\n\r\nTASK [comcast.sdkman : Cleanup SDKMAN script] ***************************************************************************************************************************************************************************************************************************\r\nchanged: [capsulecorp_oc0]\r\n\r\nTASK [comcast.sdkman : Fix permissions on SDKMAN_DIR] *******************************************************************************************************************************************************************************************************************\r\nchanged: [capsulecorp_oc0]\r\n\r\nTASK [comcast.sdkman : Run SDKMAN tasks] ********************************************************************************************************************************************************************************************************************************\r\nincluded: /Volumes/data/Users/dan/.ansible/roles/comcast.sdkman/tasks/sdkman.yml for capsulecorp_oc0\r\n\r\nTASK [comcast.sdkman : Configure SDKMAN] ********************************************************************************************************************************************************************************************************************************\r\nchanged: [capsulecorp_oc0]\r\n\r\nTASK [comcast.sdkman : Flush SDK caches (before)] ***********************************************************************************************************************************************************************************************************************\r\nok: [capsulecorp_oc0] => (item=temp)\r\n\r\nTASK [comcast.sdkman : Update SDKMAN] ***********************************************************************************************************************************************************************************************************************************\r\nok: [capsulecorp_oc0]\r\n\r\nTASK [comcast.sdkman : Install SDK candidates/versions] *****************************************************************************************************************************************************************************************************************\r\nchanged: [capsulecorp_oc0] => (item={u'version': u'8.0.163-zulu', u'candidate': u'java'})\r\nchanged: [capsulecorp_oc0] => (item={u'version': u'1.10.1', u'candidate': u'ant'})\r\n\r\nTASK [comcast.sdkman : Uninstall SDK candidates/versions] ***************************************************************************************************************************************************************************************************************\r\n\r\nTASK [comcast.sdkman : Get SDK defaults] ********************************************************************************************************************************************************************************************************************************\r\nok: [capsulecorp_oc0] => (item=ant)\r\nok: [capsulecorp_oc0] => (item=java)\r\n\r\nTASK [comcast.sdkman : Set SDK defaults] ********************************************************************************************************************************************************************************************************************************\r\n\r\nTASK [comcast.sdkman : Flush SDK caches (after)] ************************************************************************************************************************************************************************************************************************\r\nok: [capsulecorp_oc0] => (item=archives)\r\nok: [capsulecorp_oc0] => (item=broadcast)\r\nok: [capsulecorp_oc0] => (item=candidates)\r\nok: [capsulecorp_oc0] => (item=temp)\r\n\r\nTASK [Ensure presence of profile] ***************************************************************************************************************************************************************************************************************************************\r\nchanged: [capsulecorp_oc0]\r\n\r\nTASK [Add sdkman in .profile] *******************************************************************************************************************************************************************************************************************************************\r\nchanged: [capsulecorp_oc0]\r\n\r\nTASK [Add sdkman in .bashrc] ********************************************************************************************************************************************************************************************************************************************\r\nchanged: [capsulecorp_oc0]\r\n\r\nPLAY RECAP **************************************************************************************************************************************************************************************************************************************************************\r\ncapsulecorp_oc0                  : ok=24   changed=9    unreachable=0    failed=0   \r\n\r\n\r\n"}}
{"actor":{"display_login":"elliotweiser"}}