summaryrefslogtreecommitdiff
path: root/3 resources/ansible.md
diff options
context:
space:
mode:
authorJasper Ras <jras@hostnet.nl>2024-11-23 17:34:50 +0100
committerJasper Ras <jras@hostnet.nl>2024-11-23 17:34:50 +0100
commit80153a133d0888b7c0a7b72a9f80ccc6f005c555 (patch)
tree261af65acfe995e7254152136af119af489c7354 /3 resources/ansible.md
parentdbe655fca3cf4fc5bc882015006f006764eace52 (diff)
sorted out inbox
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
+```