mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Copy the permissions along with file for jboss module (#3426)
* Copy the permissions along with file for jboss module Issue: The deployment file is copied with file content only. The file permission is set to 440 and belongs to root user. When the JBossI(Wildfly) server is running under non root account, it can't read the deployment file. With is fix, the correct permission can be set from previous task for JBoss server to pickup the deployment file. * Update changelogs/fragments/3426-copy-permissions-along-with-file-for-jboss-module.yml Co-authored-by: Ajpantuso <ajpantuso@gmail.com> Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
This commit is contained in:
parent
53fc2c477b
commit
7cfdc2ce8c
2 changed files with 8 additions and 2 deletions
|
@ -0,0 +1,6 @@
|
|||
bugfixes:
|
||||
- jboss - fix the deployment file permission issue when Jboss server is running
|
||||
under non-root user. The deployment file is copied with file content only. The
|
||||
file permission is set to ``440`` and belongs to root user. When the
|
||||
JBoss ``WildFly`` server is running under non-root user, it is unable to read
|
||||
the deployment file (https://github.com/ansible-collections/community.general/pull/3426).
|
|
@ -142,7 +142,7 @@ def main():
|
|||
# Clean up old failed deployment
|
||||
os.remove(os.path.join(deploy_path, "%s.failed" % deployment))
|
||||
|
||||
shutil.copyfile(src, os.path.join(deploy_path, deployment))
|
||||
module.preserved_copy(src, os.path.join(deploy_path, deployment))
|
||||
while not deployed:
|
||||
deployed = is_deployed(deploy_path, deployment)
|
||||
if is_failed(deploy_path, deployment):
|
||||
|
@ -153,7 +153,7 @@ def main():
|
|||
if state == 'present' and deployed:
|
||||
if module.sha1(src) != module.sha1(os.path.join(deploy_path, deployment)):
|
||||
os.remove(os.path.join(deploy_path, "%s.deployed" % deployment))
|
||||
shutil.copyfile(src, os.path.join(deploy_path, deployment))
|
||||
module.preserved_copy(src, os.path.join(deploy_path, deployment))
|
||||
deployed = False
|
||||
while not deployed:
|
||||
deployed = is_deployed(deploy_path, deployment)
|
||||
|
|
Loading…
Reference in a new issue