On 9/15/20 2:36 PM, Sandy Toshev wrote:
>
> Thank you for the fast response,
>
> So I added the following at the end of the .yml file, but I guess I do not know the correct syntax, because I get an error.
> #added from suggestion
> - name: Sending an email about it
> mail:
> body: |
> Deleted some files - {% for f in files_to_delete.files %}f, {% endfor %}
> subject: Deleted files overview
> host:
smtp.gmail.com
> port: 587
> username:
my_use...@gmail.com
> password: my_very_secure_password
> to: my_private_username@my_private_domain
>
> ===
> The error is as follows:
> ERROR! We were unable to read either as JSON nor YAML, these are the errors we got from each:
> JSON: Expecting value: line 1 column 1 (char 0)
>
> Syntax Error while loading YAML.
> could not find expected ':'
Debian and Sympa administration. Provisioning with Ansible.