I am using Ansible to create a cron.d file using the cron_file parameter.
But how can I add MAILTO to a file?
It seems env = true - only for crontab, not cron.d files. I am wrong?
Since Ansible 2.0 has a command cronvar:
cronvar
# modify /etc/cron.d/sweep_for_rebel_code - cronvar: name: MAILTO value: vader@evilempire.com cron_file: sweep_for_rebel_code
See the official documentation at http://docs.ansible.com/ansible/cronvar_module.html
This works for me with impossible 2.1:
- cron: cron_file: ansible_test env: "{{ item.env }}" name: "{{ item.name }}" job: "{{ item.job }}" user: vagrant with_items: - env: true name: MAILTO job: test@test.com - env: false name: cmd job: /bin/true
Source: https://habr.com/ru/post/1649394/More articles:Magento 2 adds a filter to the collection - magento2Delete confirmation when deleting from the floating menu in the page editor in the sitecore file - sitecoreCheck if the program is running in debug mode - pythonProblems configuring iscsi on Oracle RAC node - linuxclang-format: how to prevent all function arguments in the next line? - c ++Google Search with Python - pythonSelenium webdriver how to get the allowed status of an element angularjs Li - angularjsChromium browser creates fatal errors in module_list.cc: Check Failed - c ++Matrix of polynomial elements - pythonRoute attributes do not register my controller method - c #All Articles