Fix wrong backup directory var name in apt module (#73840)
* Fix wrong backup directory var name in apt module
This commit is contained in:
parent
2c40dccd85
commit
2bff120db6
2 changed files with 5 additions and 1 deletions
4
changelogs/fragments/73840_apt-policy-rc-d.yml
Normal file
4
changelogs/fragments/73840_apt-policy-rc-d.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
bugfixes:
|
||||
- >-
|
||||
apt - fix policy_rc_d parameter throwing an exception when restoring
|
||||
original file (https://github.com/ansible/ansible/issues/66211)
|
|
@ -428,7 +428,7 @@ class PolicyRcD(object):
|
|||
try:
|
||||
shutil.move(os.path.join(self.backup_dir, 'policy-rc.d'),
|
||||
'/usr/sbin/policy-rc.d')
|
||||
os.rmdir(self.tmpdir_name)
|
||||
os.rmdir(self.backup_dir)
|
||||
except Exception:
|
||||
self.m.fail_json(msg="Fail to move back %s to /usr/sbin/policy-rc.d"
|
||||
% os.path.join(self.backup_dir, 'policy-rc.d'))
|
||||
|
|
Loading…
Reference in a new issue