summaryrefslogtreecommitdiffstats
path: root/ansible_collections/community/general/plugins/become/machinectl.py
diff options
context:
space:
mode:
Diffstat (limited to 'ansible_collections/community/general/plugins/become/machinectl.py')
-rw-r--r--ansible_collections/community/general/plugins/become/machinectl.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/ansible_collections/community/general/plugins/become/machinectl.py b/ansible_collections/community/general/plugins/become/machinectl.py
index 9b9ac7ec5..e2773ed6a 100644
--- a/ansible_collections/community/general/plugins/become/machinectl.py
+++ b/ansible_collections/community/general/plugins/become/machinectl.py
@@ -78,12 +78,13 @@ DOCUMENTATION = '''
EXAMPLES = r'''
# A polkit rule needed to use the module with a non-root user.
# See the Notes section for details.
-60-machinectl-fast-user-auth.rules: |
- polkit.addRule(function(action, subject) {
- if(action.id == "org.freedesktop.machine1.host-shell" && subject.isInGroup("wheel")) {
- return polkit.Result.AUTH_SELF_KEEP;
- }
- });
+/etc/polkit-1/rules.d/60-machinectl-fast-user-auth.rules: |
+ polkit.addRule(function(action, subject) {
+ if(action.id == "org.freedesktop.machine1.host-shell" &&
+ subject.isInGroup("wheel")) {
+ return polkit.Result.AUTH_SELF_KEEP;
+ }
+ });
'''
from re import compile as re_compile