mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 06:10:22 -07:00
Add a 'machinectl shell' become_method (#39826)
* Add a 'machinectl shell' become_method * docs: add explanations for the machinectl become_method * docs: machinectl become_method: specify this part is specific to Linux+systemd setups
This commit is contained in:
parent
174d7f8ea2
commit
313a46744d
4 changed files with 39 additions and 5 deletions
|
@ -59,7 +59,7 @@ def set_constant(name, value, export=vars()):
|
|||
|
||||
|
||||
# CONSTANTS ### yes, actual ones
|
||||
BECOME_METHODS = ['sudo', 'su', 'pbrun', 'pfexec', 'doas', 'dzdo', 'ksu', 'runas', 'pmrun', 'enable']
|
||||
BECOME_METHODS = ['sudo', 'su', 'pbrun', 'pfexec', 'doas', 'dzdo', 'ksu', 'runas', 'pmrun', 'enable', 'machinectl']
|
||||
BECOME_ERROR_STRINGS = {
|
||||
'sudo': 'Sorry, try again.',
|
||||
'su': 'Authentication failure',
|
||||
|
@ -70,6 +70,7 @@ BECOME_ERROR_STRINGS = {
|
|||
'ksu': 'Password incorrect',
|
||||
'pmrun': 'You are not permitted to run this command',
|
||||
'enable': '',
|
||||
'machinectl': '',
|
||||
} # FIXME: deal with i18n
|
||||
BECOME_MISSING_STRINGS = {
|
||||
'sudo': 'sorry, a password is required to run sudo',
|
||||
|
@ -81,6 +82,7 @@ BECOME_MISSING_STRINGS = {
|
|||
'ksu': 'No password given',
|
||||
'pmrun': '',
|
||||
'enable': '',
|
||||
'machinectl': '',
|
||||
} # FIXME: deal with i18n
|
||||
BLACKLIST_EXTS = ('.pyc', '.pyo', '.swp', '.bak', '~', '.rpm', '.md', '.txt')
|
||||
BOOL_TRUE = BOOLEANS_TRUE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue