mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Use an octal representation that works from 2.4->3+ for known_hosts
This commit is contained in:
parent
6312e38133
commit
80d23d639c
1 changed files with 1 additions and 1 deletions
|
@ -169,7 +169,7 @@ def add_host_key(module, fqdn, key_type="rsa", create_dir=False):
|
|||
if not os.path.exists(user_ssh_dir):
|
||||
if create_dir:
|
||||
try:
|
||||
os.makedirs(user_ssh_dir, 0o700)
|
||||
os.makedirs(user_ssh_dir, int('700', 8))
|
||||
except:
|
||||
module.fail_json(msg="failed to create host key directory: %s" % user_ssh_dir)
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue