mirror of
https://github.com/DaanSelen/meshbook.git
synced 2026-02-20 08:22:11 +00:00
Expansion of previous commit.
This commit is contained in:
19
examples/all_variable_usage_example.yaml
Normal file
19
examples/all_variable_usage_example.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
name: Ping Multiple Points
|
||||
group: "Kubernetes"
|
||||
#target_os: "Debian"
|
||||
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 }}"
|
||||
32
examples/linux/aggregate_example.yaml
Normal file
32
examples/linux/aggregate_example.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
name: Echo some text in the terminal of the device
|
||||
group: "Development"
|
||||
target_os: "Linux" # <----
|
||||
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"
|
||||
13
examples/linux/apt_update_example.yaml
Normal file
13
examples/linux/apt_update_example.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
name: Refresh the apt cache
|
||||
device: "<Device-Name>"
|
||||
#target_os: "Linux"
|
||||
variables:
|
||||
- name: package_manager
|
||||
value: "apt"
|
||||
tasks:
|
||||
- name: refresh the {{ package_manager }} cache
|
||||
command: "{{ package_manager }} update"
|
||||
|
||||
- name: display available upgrades with {{ package_manager }}
|
||||
command: "{{ package_manager }} list --upgradable"
|
||||
19
examples/linux/apt_upgrade_example.yaml
Normal file
19
examples/linux/apt_upgrade_example.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
name: Refresh the apt cache
|
||||
group: "Dev"
|
||||
#target_os: "Linux"
|
||||
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"
|
||||
10
examples/linux/echo_example.yaml
Normal file
10
examples/linux/echo_example.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
name: Echo a string to the terminal through the meshbook example.
|
||||
group: "Development"
|
||||
target_os: "Linux"
|
||||
variables:
|
||||
- name: file
|
||||
value: "/etc/os-release"
|
||||
tasks:
|
||||
- name: Echo!
|
||||
command: "echo $(cat {{ file }})"
|
||||
11
examples/windows/get_sys_info.yaml
Normal file
11
examples/windows/get_sys_info.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
name: Echo a string to the terminal through the meshbook example.
|
||||
group: "Endpoint"
|
||||
target_os: "Windows"
|
||||
powershell: True
|
||||
#variables:
|
||||
# - name: file
|
||||
# value: "/etc/os-release"
|
||||
tasks:
|
||||
- name: Echo!
|
||||
command: "Get-ComputerInfo | Select-Object CsName, OsName, OsArchitecture, OsLastBootUpTime | Write-Output"
|
||||
8
examples/windows/get_update_info.yaml
Normal file
8
examples/windows/get_update_info.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
name: Echo a string to the terminal through the meshbook example.
|
||||
group: "Endpoint"
|
||||
target_os: "Windows"
|
||||
powershell: True
|
||||
tasks:
|
||||
- name: Get some update information
|
||||
command: "Get-HotFix | Select-Object PSComputerName, HotFixID, InstalledOn"
|
||||
16
examples/windows/multiline_example.yaml
Normal file
16
examples/windows/multiline_example.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
name: Echo a string to the terminal through the meshbook example.
|
||||
group: "Endpoint"
|
||||
target_os: "Windows"
|
||||
powershell: True
|
||||
#variables:
|
||||
# - name: file
|
||||
# value: "/etc/os-release"
|
||||
tasks:
|
||||
- name: Echo!
|
||||
command: >
|
||||
$systemInfo = Get-ComputerInfo | Select-Object CsName, OsName, OsArchitecture, OsLastBootUpTime;
|
||||
$systemInfo | Format-Table -AutoSize;
|
||||
Write-Output "I like monkeys.";
|
||||
Get-SystemLanguage | Write-Output;
|
||||
Get-ComputerInfo | Format-List;
|
||||
Reference in New Issue
Block a user