Merge pull request #386 from saito-hideki/pr/ci_ansible-test-sanity-docker-devel

[CI] Address pylint check check error in ansible-test-sanity-docker-devel test

SUMMARY
Currently, ansible-test-sanity-docker-devel is set non voting, but we need to fix pylint check error in several modules.

https://ansible.softwarefactory-project.io/zuul/build/fbd5ac593fe44fa7b3d77e5557de1607

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

 ansible.posix.authorized_keys
 ansible.posix.mount

ADDITIONAL INFORMATION
None
This commit is contained in:
softwarefactory-project-zuul[bot] 2022-09-12 03:36:06 +00:00 committed by GitHub
commit e629ae2d7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 1 deletions

View file

@ -0,0 +1,3 @@
---
trivial:
- CI - following the new CI testing rule ansible-test-sanity-docker-devel.

View file

@ -347,6 +347,8 @@ def keyfile(module, user, write=False, path=None, manage_dir=True, follow=False)
basedir = os.path.dirname(keysfile)
if not os.path.exists(basedir):
os.makedirs(basedir)
f = None
try:
f = open(keysfile, "w") # touches file so we can set ownership and perms
finally:

View file

@ -226,7 +226,7 @@ def _escape_fstab(v):
if isinstance(v, int):
return v
else:
return(
return (
v.
replace('\\', '\\134').
replace(' ', '\\040').

View file

@ -1,5 +1,14 @@
# -------------------------------------------------------------
# Setup steps
- name: Clean up the working directory and files
file:
path: '{{ output_dir }}'
state: absent
- name: Create the working directory
file:
path: '{{ output_dir }}'
state: directory
- name: copy an existing file in place with comments
copy: