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

Allow one to override the hardcoded value "ansible_syslogger" in the syslogger module. #319

Closed
mivanov-its opened this issue May 11, 2020 · 6 comments · Fixed by #340
Closed
Labels
feature This issue/PR relates to a feature request has_pr module module

Comments

@mivanov-its
Copy link

SUMMARY

Copied from ansible/ansible#69428.

It is useful to allow one to specify the application name in the syslogger module. It is hardcoded to "ansible_syslogger" at the moment, see:

https://github.com/ansible-collections/community.general/blob/master/plugins/modules/notification/syslogger.py#L145
https://github.com/ansible-collections/community.general/blob/master/plugins/modules/notification/syslogger.py#L149

Moreover, this hardcoded string is not mentioned in the documentation:

https://docs.ansible.com/ansible/latest/modules/syslogger_module.html

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

plugins/modules/notification/syslogger.py

ADDITIONAL INFORMATION

One could override it with:

- name: Test syslog
  syslogger:
    appname: "myapp"
    msg: "Hello from ansible"
    priority: "err"
    facility: "daemon"
    log_pid: true

or in some other way.

@ansibullbot
Copy link
Collaborator

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

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added affects_2.10 feature This issue/PR relates to a feature request module module labels May 11, 2020
@Akasurde
Copy link
Member

resolved_by_pr #340

@Akasurde
Copy link
Member

@mivanov-itsonix, Could you please check PR #340 and let us know if it works for you ?

Please check How to test a PR for more help.

Thanks.

needs_info

@ansibullbot ansibullbot added has_pr needs_info This issue requires further information. Please answer any outstanding questions labels May 14, 2020
@mivanov-its
Copy link
Author

@Akasurde , that works for me, thank you for your time.

PS:

You can remove the alias "appname", I do not insist on that as it was just an example. Ident works fine for me.

@ansibullbot ansibullbot removed the needs_info This issue requires further information. Please answer any outstanding questions label May 14, 2020
Akasurde added a commit to Akasurde/community.general that referenced this issue May 15, 2020
Added new parameter ident to specify the name of application
which is sending the message to syslog using syslogger module.

Fixes: ansible-collections#319

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
@Akasurde
Copy link
Member

@mivanov-itsonix Thanks for testing and providing the feedback. I implemented the required changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue/PR relates to a feature request has_pr module module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants