{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/33581","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/33581/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/33581/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/33581/events","html_url":"https://github.com/ansible/ansible/issues/33581","id":279386519,"node_id":"MDU6SXNzdWUyNzkzODY1MTk=","number":33581,"title":"Name of task containing block is not printed to stdout","user":{"login":"Spitfire1900","id":6462596,"node_id":"MDQ6VXNlcjY0NjI1OTY=","avatar_url":"https://avatars2.githubusercontent.com/u/6462596?v=4","gravatar_id":"","url":"https://api.github.com/users/Spitfire1900","html_url":"https://github.com/Spitfire1900","followers_url":"https://api.github.com/users/Spitfire1900/followers","following_url":"https://api.github.com/users/Spitfire1900/following{/other_user}","gists_url":"https://api.github.com/users/Spitfire1900/gists{/gist_id}","starred_url":"https://api.github.com/users/Spitfire1900/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Spitfire1900/subscriptions","organizations_url":"https://api.github.com/users/Spitfire1900/orgs","repos_url":"https://api.github.com/users/Spitfire1900/repos","events_url":"https://api.github.com/users/Spitfire1900/events{/privacy}","received_events_url":"https://api.github.com/users/Spitfire1900/received_events","type":"User","site_admin":false},"labels":[{"id":562292166,"node_id":"MDU6TGFiZWw1NjIyOTIxNjY=","url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.4","name":"affects_2.4","color":"ededed","default":false},{"id":852590921,"node_id":"MDU6TGFiZWw4NTI1OTA5MjE=","url":"https://api.github.com/repos/ansible/ansible/labels/feature","name":"feature","color":"006b75","default":false},{"id":636327968,"node_id":"MDU6TGFiZWw2MzYzMjc5Njg=","url":"https://api.github.com/repos/ansible/ansible/labels/support:community","name":"support:community","color":"ededed","default":false},{"id":468273802,"node_id":"MDU6TGFiZWw0NjgyNzM4MDI=","url":"https://api.github.com/repos/ansible/ansible/labels/test","name":"test","color":"0e8a16","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2017-12-05T14:05:02Z","updated_at":"2018-11-12T03:50:51Z","closed_at":null,"author_association":"NONE","body":"##### ISSUE TYPE\r\n - Feature Idea\r\n\r\n\r\n\r\n##### COMPONENT NAME\r\nAnsible Blocks\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.4.0.0\r\n  config file = /etc/ansible/ansible.cfg\r\n  configured module search path = [~/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /usr/lib/python2.7/site-packages/ansible\r\n  executable location = /usr/bin/ansible\r\n  python version = 2.7.5 (default, May  3 2017, 07:55:04) [GCC 4.8.5 20150623 (Red Hat 4.8.5-14)]\r\n```\r\n\r\n##### CONFIGURATION\r\n<!---\r\nIf using Ansible 2.4 or above, paste the results of \"ansible-config dump --only-changed\"\r\n\r\nOtherwise, mention any settings you have changed/added/removed in ansible.cfg\r\n(or using the ANSIBLE_* environment variables).\r\n\r\n-->\r\n\r\n##### OS / ENVIRONMENT\r\nRed Hat Enterprise Linux Server release 7.4 (Maipo) (master and target)\r\n\r\n##### SUMMARY\r\nWhen a block is included in a named task the stdout when running the playbook does not include the name of the task containing the block.\r\n\r\n##### STEPS TO REPRODUCE\r\n```\r\n- name: apply-custom-error-pages\r\n  block:\r\n    - copy:\r\n        src=files/{{ env }}/404.jsp\r\n        dest={{ liferay_webapps_portal }}\r\n      notify:\r\n        - apply-puppet-config\r\n    - copy:\r\n        src=files/{{ env }}/500.html\r\n        dest={{ liferay_webapps_portal }}\r\n      notify:\r\n        - apply-puppet-config\r\n```\r\n\r\n##### EXPECTED RESULTS\r\nThe task name is echoed to stdout, perhaps with output like follows:\r\n```\r\nTASK [base-liferay : apply-custom-error-pages : copy] *******************************************************************************************************************************************************************************\r\nchanged: [hostname]\r\n\r\nTASK [base-liferay : apply-custom-error-pages : copy] *******************************************************************************************************************************************************************************\r\nchanged: [hostname]\r\n```\r\n##### ACTUAL RESULTS\r\nThe task name is not echoed to stdout\r\n\r\n```\r\nTASK [base-liferay : copy] *******************************************************************************************************************************************************************************\r\nchanged: [hostname]\r\n\r\nTASK [base-liferay : copy] *******************************************************************************************************************************************************************************\r\nchanged: [hostname]\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/437744590","html_url":"https://github.com/ansible/ansible/issues/33581#issuecomment-437744590","issue_url":"https://api.github.com/repos/ansible/ansible/issues/33581","id":437744590,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNzc0NDU5MA==","user":{"login":"CNG","id":282056,"node_id":"MDQ6VXNlcjI4MjA1Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/282056?v=4","gravatar_id":"","url":"https://api.github.com/users/CNG","html_url":"https://github.com/CNG","followers_url":"https://api.github.com/users/CNG/followers","following_url":"https://api.github.com/users/CNG/following{/other_user}","gists_url":"https://api.github.com/users/CNG/gists{/gist_id}","starred_url":"https://api.github.com/users/CNG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CNG/subscriptions","organizations_url":"https://api.github.com/users/CNG/orgs","repos_url":"https://api.github.com/users/CNG/repos","events_url":"https://api.github.com/users/CNG/events{/privacy}","received_events_url":"https://api.github.com/users/CNG/received_events","type":"User","site_admin":false},"created_at":"2018-11-12T03:50:51Z","updated_at":"2018-11-12T03:50:51Z","author_association":"NONE","body":"I was trying to use a block level `name` to reconcile the part of me that needs each action `name` to be explicit and the part of me that HATES repeating himself using tools that are supposed to simplify maintenance.\r\n\r\nI'd love to do this:\r\n\r\n```\r\n- name: Patch Folding@Home service to start idle timer\r\n  block:\r\n    - name: Create directory\r\n      ...\r\n    - name: Install Systemd unit file\r\n      ...\r\n```\r\n\r\nBut I have to do this:\r\n\r\n```\r\n- block:\r\n    - name: \"Patch Folding@Home service to start idle timer: Create directory\"\r\n      ...\r\n    - name: \"Patch Folding@Home service to start idle timer: Install Systemd unit file\"\r\n      ...\r\n```\r\n\r\n> **Note:** I could *almost* work around this insanity if YAML supported concatenation...\r\n> \r\n> ```\r\n> - name: &myname \"Patch Folding@Home service to start idle timer\"\r\n>   block:\r\n>     - name: *myname + \"Create directory\"\r\n>       ...\r\n>     - name: *myname + \"Install Systemd unit file\"\r\n>       ...\r\n> ```\r\n> \r\n> But that's admittedly a separate can of worms.\r\n\r\nLet's get `name`s on blocks working as described above, please!"}}
{"actor":{"display_login":"CNG"}}