diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-05 16:16:47 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-05 16:16:47 +0000 |
commit | 7a7fb74454bb3a169acecd30e87067502bfe3260 (patch) | |
tree | d684cbea7ffc70bd39a1e52bb65b0ea5ae156bda /lib/ansible/modules/cron.py | |
parent | Adding upstream version 2.16.6. (diff) | |
download | ansible-core-7a7fb74454bb3a169acecd30e87067502bfe3260.tar.xz ansible-core-7a7fb74454bb3a169acecd30e87067502bfe3260.zip |
Adding upstream version 2.17.0.upstream/2.17.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/ansible/modules/cron.py')
-rw-r--r-- | lib/ansible/modules/cron.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ansible/modules/cron.py b/lib/ansible/modules/cron.py index d43c813..3500770 100644 --- a/lib/ansible/modules/cron.py +++ b/lib/ansible/modules/cron.py @@ -7,8 +7,7 @@ # Copyright: (c) 2015, Luca Berruti <nadirio@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -from __future__ import absolute_import, division, print_function -__metaclass__ = type +from __future__ import annotations DOCUMENTATION = r''' @@ -215,6 +214,7 @@ import sys import tempfile from ansible.module_utils.basic import AnsibleModule +from ansible.module_utils.common.file import S_IRWU_RWG_RWO from ansible.module_utils.common.text.converters import to_bytes, to_native from ansible.module_utils.six.moves import shlex_quote @@ -308,7 +308,7 @@ class CronTab(object): fileh = open(self.b_cron_file, 'wb') else: filed, path = tempfile.mkstemp(prefix='crontab') - os.chmod(path, int('0644', 8)) + os.chmod(path, S_IRWU_RWG_RWO) fileh = os.fdopen(filed, 'wb') fileh.write(to_bytes(self.render())) |