Server IP : 85.214.239.14 / Your IP : 18.116.87.225 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/ansible_collections/community/windows/plugins/modules/ |
Upload File : |
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Jon Hawkesworth (@jhawkesworth) <jhawkesworth@protonmail.com> # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) DOCUMENTATION = r''' --- module: win_toast short_description: Sends Toast windows notification to logged in users on Windows 10 or later hosts description: - Sends alerts which appear in the Action Center area of the windows desktop. options: expire: description: - How long in seconds before the notification expires. type: int default: 45 group: description: - Which notification group to add the notification to. type: str default: Powershell msg: description: - The message to appear inside the notification. - May include \n to format the message to appear within the Action Center. type: str default: Hello, World! popup: description: - If C(no), the notification will not pop up and will only appear in the Action Center. type: bool default: yes tag: description: - The tag to add to the notification. type: str default: Ansible title: description: - The notification title, which appears in the pop up.. type: str default: Notification HH:mm notes: - This module must run on a windows 10 or Server 2016 host, so ensure your play targets windows hosts, or delegates to a windows host. - The module does not fail if there are no logged in users to notify. - Messages are only sent to the local host where the module is run. - You must run this module with async, otherwise it will hang until the expire period has passed. seealso: - module: community.windows.win_msg - module: community.windows.win_say author: - Jon Hawkesworth (@jhawkesworth) ''' EXAMPLES = r''' - name: Warn logged in users of impending upgrade (note use of async to stop the module from waiting until notification expires). community.windows.win_toast: expire: 60 title: System Upgrade Notification msg: Automated upgrade about to start. Please save your work and log off before {{ deployment_start_time }} async: 60 poll: 0 ''' RETURN = r''' expire_at_utc: description: Calculated utc date time when the notification expires. returned: always type: str sample: 07 July 2017 04:50:54 no_toast_sent_reason: description: Text containing the reason why a notification was not sent. returned: when no logged in users are detected type: str sample: No logged in users to notify sent_localtime: description: local date time when the notification was sent. returned: always type: str sample: 07 July 2017 05:45:54 time_taken: description: How long the module took to run on the remote windows host in seconds. returned: always type: float sample: 0.3706631999999997 toast_sent: description: Whether the module was able to send a toast notification or not. returned: always type: bool sample: false '''