summaryrefslogtreecommitdiff
path: root/3 resources/ansible.md
diff options
context:
space:
mode:
Diffstat (limited to '3 resources/ansible.md')
-rw-r--r--3 resources/ansible.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/3 resources/ansible.md b/3 resources/ansible.md
new file mode 100644
index 0000000..501f9d0
--- /dev/null
+++ b/3 resources/ansible.md
@@ -0,0 +1,20 @@
+# Ad-hoc commands
+update apt cache:
+```
+ansible <pattern> -m ansible.builtin.apt -a "update_cache=true cache_valid_time=3600"
+```
+
+update packages:
+```
+ansible <pattern> -m ansible.builtin.apt -a "name=* state=latest"
+```
+
+run puppet:
+```
+ansible <pattern> -a "/opt/puppetlabs/bin/puppet agent --test"
+```
+
+reboot:
+```
+ansible <pattern> -m ansible.builtin.reboot -f 1
+```