Note
This plugin is part of the community.general collection.
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.irc
.
The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
channel string / required | Channel name. One of nick_to or channel needs to be set. When both are set, the message will be sent to both of them. | |
color string |
| Text color for the message. ("none" is a valid option in 1.6 or later, in 1.6 and prior, the default color is black, not "none"). Added 11 more colors in version 2.0. |
key string | Channel key | |
msg string / required | The message body. | |
nick string | Default: "ansible" | Nickname to send the message from. May be shortened, depending on server's NICKLEN setting. |
nick_to string | A list of nicknames to send the message to. One of nick_to or channel needs to be set. When both are defined, the message will be sent to both of them. | |
part boolean |
| Designates whether user should part from channel after sending message or not. Useful for when using a faux bot and not wanting join/parts between messages. |
passwd string | Server password | |
port string | Default: 6667 | IRC server port number |
server string | Default: "localhost" | IRC server name/address |
style string |
| Text style for the message. Note italic does not work on some clients |
timeout string | Default: 30 | Timeout to use while waiting for successful registration and join messages, this is to prevent an endless loop |
topic string | Set the channel topic | |
use_ssl boolean |
| Designates whether TLS/SSL should be used when connecting to the IRC server |
- name: Send a message to an IRC channel from nick ansible community.general.irc: server: irc.example.net channel: #t1 msg: Hello world - name: Send a message to an IRC channel local_action: module: irc port: 6669 server: irc.example.net channel: #t1 msg: 'All finished at {{ ansible_date_time.iso8601 }}' color: red nick: ansibleIRC - name: Send a message to an IRC channel local_action: module: irc port: 6669 server: irc.example.net channel: #t1 nick_to: - nick1 - nick2 msg: 'All finished at {{ ansible_date_time.iso8601 }}' color: red nick: ansibleIRC
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/community/general/irc_module.html