hosts
Ensure that the `hosts` definition is always defined, defaulting to an empty set. Due to the lack of an Ansible inventory file this is most likely meant to be set as an Ansible extra variable [1]. We also rename the variable named `hosts` to `my_hosts` because `hosts` is a reserved name in Ansible. Reserved names in Ansible are for example all class variable names of plays, roles, blocks, and tasks [2], and `hosts` for example is used by plays [3]. [1] https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_variables.html#defining-variables-at-runtime [2] https://github.com/ansible/ansible/blob/v2.16.4/lib/ansible/vars/reserved.py#L39 [3] https://github.com/ansible/ansible/blob/v2.16.4/lib/ansible/playbook/play.py#L58
community.general.discord
This should provide a more robust solution for sending notifications to Discord rather than using plain `ansible.builtin.uri` for that task. Additionally add some comments which should hopefully give better guidance what to do. Fixes #82.
This makes text files compliant to POSIX which requires every line of a text file to end with a newline character [1][2]. [1] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_403 [2] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206