-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
78 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
# deadnews.util.reboot | ||
|
||
> Reboot machine if nedeed | ||
## Example Playbook | ||
|
||
```yaml | ||
- hosts: servers | ||
roles: | ||
- role: deadnews.util.reboot | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# deadnews.util.system_info | ||
|
||
> Show system info | ||
## Example Playbook | ||
|
||
```yaml | ||
- hosts: servers | ||
roles: | ||
- role: deadnews.util.system_info | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
galaxy_info: | ||
author: DeadNews | ||
description: Show system info | ||
license: MIT | ||
min_ansible_version: 2.16.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
# Show system info | ||
|
||
- name: Show system info (can be cashed) | ||
ansible.builtin.debug: | ||
msg: | | ||
Hostname: {{ ansible_hostname }} | ||
System: {{ ansible_distribution }} {{ ansible_distribution_version }} {{ ansible_distribution_release }} | ||
Kernel: {{ ansible_kernel }} | ||
Python: {{ ansible_python_version }} | ||
Product: {{ ansible_product_name }} | ||
CPUs: {{ ansible_processor_count }} × {{ ansible_processor[2] }} | ||
Cores: {{ ansible_processor_nproc }} cores, {{ ansible_processor_nproc * ansible_processor_threads_per_core }} threads | ||
Memory: {{ (ansible_memtotal_mb / 1024) | round(2) }} GiB | ||
Uptime: {{ | ||
(ansible_uptime_seconds // 86400) | string + 'd ' + | ||
((ansible_uptime_seconds // 3600) % 24) | string + 'h ' + | ||
((ansible_uptime_seconds // 60) % 60) | string + 'm ' + | ||
(ansible_uptime_seconds % 60) | string + 's' | ||
}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters