mirror of
https://github.com/DaanSelen/meshbook.git
synced 2026-02-20 08:22:11 +00:00
Revert "Learning git... stopped tracking examples directory."
This reverts commit 234683e49c.
Adding examples back.
This commit is contained in:
31
examples/aggregate_example.yaml
Normal file
31
examples/aggregate_example.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
name: Echo some text in the terminal of the device
|
||||
group: "Dev"
|
||||
variables:
|
||||
- name: package_manager
|
||||
value: "apt"
|
||||
- name: google_dns
|
||||
value: "8.8.8.8"
|
||||
- name: "quad9_dns"
|
||||
value: "9.9.9.9"
|
||||
tasks:
|
||||
- name: refresh the cache
|
||||
command: "{{ package_manager }} update"
|
||||
|
||||
- name: display available upgrades
|
||||
command: "{{ package_manager }} list --upgradable"
|
||||
|
||||
- name: apply upgrades
|
||||
command: "{{ package_manager }} upgrade -y"
|
||||
|
||||
- name: cleanup remaining packages
|
||||
command: "{{ package_manager }} autoremove -y"
|
||||
|
||||
- name: run autoclean
|
||||
command: "{{ package_manager }} autoclean -y"
|
||||
|
||||
- name: Ping Google DNS
|
||||
command: "ping {{ google_dns }} -c 4"
|
||||
|
||||
- name: Ping Quad9 DNS
|
||||
command: "ping {{ quad9_dns }} -c 4"
|
||||
12
examples/apt_update_example.yaml
Normal file
12
examples/apt_update_example.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
name: Refresh the apt cache
|
||||
device: Cubic
|
||||
variables:
|
||||
- name: package_manager
|
||||
value: "apt"
|
||||
tasks:
|
||||
- name: refresh the cache
|
||||
command: "{{ package_manager }} update"
|
||||
|
||||
- name: display available upgrades
|
||||
command: "{{ package_manager }} list --upgradable"
|
||||
18
examples/apt_upgrade_example.yaml
Normal file
18
examples/apt_upgrade_example.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
name: Refresh the apt cache
|
||||
group: "Dev"
|
||||
variables:
|
||||
- name: package_manager
|
||||
value: "apt"
|
||||
tasks:
|
||||
- name: refresh the cache
|
||||
command: "{{ package_manager }} update"
|
||||
|
||||
- name: display available upgrades
|
||||
command: "{{ package_manager }} list --upgradable"
|
||||
|
||||
- name: apply upgrades
|
||||
command: "{{ package_manager }} upgrade -y"
|
||||
|
||||
- name: cleanup remaining packages
|
||||
command: "{{ package_manager }} autoremove -y"
|
||||
9
examples/echo_example.yaml
Normal file
9
examples/echo_example.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
name: Echo a string to the terminal through the meshbook example.
|
||||
group: "Dev"
|
||||
variables:
|
||||
- name: file
|
||||
value: "/etc/os-release"
|
||||
tasks:
|
||||
- name: Echo!
|
||||
command: "echo $(cat {{ file }})"
|
||||
18
examples/variable_usage_example.yaml
Normal file
18
examples/variable_usage_example.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
name: Ping Multiple Points
|
||||
group: "Kubernetes"
|
||||
variables:
|
||||
- name: host1
|
||||
value: "1.1.1.1"
|
||||
- name: host2
|
||||
value: "9.9.9.9"
|
||||
- name: command1
|
||||
value: "ping"
|
||||
- name: cmd_arguments
|
||||
value: "-c 4"
|
||||
tasks:
|
||||
- name: Ping host1
|
||||
command: "{{ command1 }} {{ host1 }} {{ cmd_arguments }}"
|
||||
|
||||
- name: Ping host2
|
||||
command: "{{ command1 }} {{ host2 }} {{ cmd_arguments }}"
|
||||
Reference in New Issue
Block a user