Created
August 26, 2019 06:45
-
-
Save kskmori/08db4ddf511ed08fecff722eb60114d7 to your computer and use it in GitHub Desktop.
osc2018tk-demo sudo install debug.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: 127.0.0.1 | |
connection: local | |
become: true | |
max_fail_percentage: 0 | |
tasks: | |
- name: debug | |
debug: | |
var: ansible_facts | |
- name: user | |
debug: | |
var: ansible_env.SUDO_USER | |
- name: home | |
debug: | |
var: ansible_env.HOME |
Summary: sudo
vs. -K
as ansible-playbook local privilege escalation methods
- sudo ansible-playbook
- HOME is different between Linux and OSX
- Linux: root's home
- OSX: regular user's home - this is OSX's default
- HOME is different between Linux and OSX
- ansible-playbook -K
- HOME is different from the default
sudo
behavior on OSX, but behaves similar to Linux - SUDO Password is always asked even if already in root
- SUDO_USER env var is not set if already in root
- HOME is different from the default
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
=== Linux root (revised)