From a435898101343b1ecea5ee0f3b338936df646a53 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Fri, 25 Oct 2024 16:07:45 +0800 Subject: [PATCH] vault backup: 2024-10-25 16:07:45 Affected files: docs/Command Snippets/Ansible Snippets.md --- docs/Command Snippets/Ansible Snippets.md | 8 ++++++++ 1 file changed, 8 insertions(+) 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