ansible / ansible.builtin / v2.9.27 / module / irc Send a message to an IRC channel | "added in version" 1.2 of ansible.builtin" Authors: Jan-Piet Mens (@jpmens), Matt Martz (@sivel) stableinterface | supported by communityansible.builtin.irc (v2.9.27) — module
pip
Install with pip install ansible==2.9.27
Send a message to an IRC channel. This is a very simplistic implementation.
- irc: server: irc.example.net channel: #t1 msg: Hello world
- local_action: module: irc port: 6669 server: irc.example.net channel: #t1 msg: 'All finished at {{ ansible_date_time.iso8601 }}' color: red nick: ansibleIRC
- 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
key: description: - Channel key version_added: '1.7' version_added_collection: ansible.builtin msg: description: - The message body. required: true nick: default: ansible description: - Nickname to send the message from. May be shortened, depending on server's NICKLEN setting. part: default: 'yes' description: - 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. type: bool version_added: '2.0' version_added_collection: ansible.builtin port: default: 6667 description: - IRC server port number color: choices: - none - white - black - blue - green - red - brown - purple - orange - yellow - light_green - teal - light_cyan - light_blue - pink - gray - light_gray default: none description: - 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. style: choices: - bold - underline - reverse - italic description: - Text style for the message. Note italic does not work on some clients version_added: '2.0' version_added_collection: ansible.builtin topic: description: - Set the channel topic version_added: '2.0' version_added_collection: ansible.builtin passwd: description: - Server password server: default: localhost description: - IRC server name/address channel: description: - 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. required: true nick_to: description: - 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. version_added: '2.0' version_added_collection: ansible.builtin timeout: default: 30 description: - Timeout to use while waiting for successful registration and join messages, this is to prevent an endless loop version_added: '1.5' version_added_collection: ansible.builtin use_ssl: default: 'no' description: - Designates whether TLS/SSL should be used when connecting to the IRC server type: bool version_added: '1.8' version_added_collection: ansible.builtin