Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Featured ansible_failed_task.host info on ansible_failed_task #48410

Closed
macklus opened this issue Nov 9, 2018 · 7 comments
Closed

Featured ansible_failed_task.host info on ansible_failed_task #48410

macklus opened this issue Nov 9, 2018 · 7 comments
Labels
affects_2.8 This issue/PR affects Ansible v2.8 feature This issue/PR relates to a feature request. needs_info This issue requires further information. Please answer any outstanding questions. support:core This issue/PR relates to code supported by the Ansible Engineering Team.

Comments

@macklus
Copy link

macklus commented Nov 9, 2018

SUMMARY

when use block/rescue for Slack alerts on failures, if task is running on múltiple nodes, you dont know where the task fail. Added a ansible_failed_task.node should solve it.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

code on block/rescue

ADDITIONAL INFORMATION
- hosts: 
    tag_Function_PrivatePhp
  become: true
  vars_files:
    - /var/lib/metadata.yml
  tasks:
  - block:
    - name: resque
      command: systemctl status daemon-resque
      changed_when: false
    rescue:
      - name: Send notification message via Slack all options
        slack:
          token: here_the_toke
          msg: Fallo en la plataforma {{ env_type }}, en el servicio {{ ansible_failed_task.name }}
          parse: 'none'

tag_Function_PrivatePhp contains 20 nodes.

@ansibot
Copy link
Contributor

ansibot commented Nov 9, 2018

Hi @macklus, thank you for submitting this issue!

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Nov 9, 2018

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 feature This issue/PR relates to a feature request. module This issue/PR relates to a module. needs_maintainer Ansibot is unable to identify maintainers for this PR. (Check `author` in docs or BOTMETA.yml) needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Nov 9, 2018
@mkrizek mkrizek removed the needs_triage Needs a first human triage before being processed. label Nov 9, 2018
@mkrizek
Copy link
Contributor

mkrizek commented Nov 9, 2018

Why not use e.g. inventory_hostname variable for that purpose?

@mkrizek mkrizek added the needs_info This issue requires further information. Please answer any outstanding questions. label Nov 12, 2018
@ansibot ansibot removed the needs_maintainer Ansibot is unable to identify maintainers for this PR. (Check `author` in docs or BOTMETA.yml) label Nov 12, 2018
@jctanner
Copy link
Contributor

!component =lib/ansible/playbook/block.py

@ansibot
Copy link
Contributor

ansibot commented Nov 19, 2018

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot ansibot removed module This issue/PR relates to a module. support:community This issue/PR relates to code supported by the Ansible community. labels Nov 19, 2018
@ansibot
Copy link
Contributor

ansibot commented Dec 15, 2018

@macklus This issue is waiting for your response. Please respond or the issue will be closed.

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Jan 17, 2019

@macklus You have not responded to information requests in this issue so we will assume it no longer affects you. If you are still interested in this, please create a new issue with the requested information.

click here for bot help

@ansibot ansibot closed this as completed Jan 17, 2019
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 feature This issue/PR relates to a feature request. needs_info This issue requires further information. Please answer any outstanding questions. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

No branches or pull requests

4 participants