diff --git a/docs/Command Snippets/Ansible Snippets.md b/docs/Command Snippets/Ansible Snippets.md index 20d9b18..9f7b119 100644 --- a/docs/Command Snippets/Ansible Snippets.md +++ b/docs/Command Snippets/Ansible Snippets.md @@ -12,4 +12,12 @@ ansible all -m gather_facts # Limit to one device ansible all -m gather_facts --limit ADDRESS +``` +Elevate command to root user +```bash +# This will fail without sudo +ansible all -m apt -a update_cache=true + +# This will succeed +ansible all -m apt -a update_cache=true ``` \ No newline at end of file