You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
338 B
YAML
18 lines
338 B
YAML
![]()
6 years ago
|
# End the play if we're not on Linux and a raw 'sudo' command isn't available.
|
||
|
# Expects connection:local
|
||
|
|
||
|
- shell: uname -s
|
||
|
register: out
|
||
|
|
||
|
- meta: end_play
|
||
|
when: out.stdout != 'Linux'
|
||
|
|
||
|
- command: sudo -n whoami
|
||
|
args:
|
||
|
warn: false
|
||
|
ignore_errors: true
|
||
|
register: sudo_available
|
||
|
|
||
|
- meta: end_play
|
||
|
when: sudo_available.rc != 0
|