mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-25 17:50:23 -07:00
Fix for sudo defaults if sudo is passed in via --extra-vars
This commit is contained in:
parent
7d7ff9d616
commit
a768e9a9ff
2 changed files with 12 additions and 2 deletions
|
@ -68,8 +68,9 @@ class Task(object):
|
|||
self.name = ds.get('name', None)
|
||||
self.tags = [ 'all' ]
|
||||
self.register = ds.get('register', None)
|
||||
self.sudo = ds.get('sudo', play.sudo)
|
||||
if self.sudo is True:
|
||||
self.sudo = utils.boolean(ds.get('sudo', play.sudo))
|
||||
|
||||
if self.sudo:
|
||||
self.sudo_user = ds.get('sudo_user', play.sudo_user)
|
||||
self.sudo_pass = ds.get('sudo_pass', play.playbook.sudo_pass)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue