mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-04-19 21:52:27 +00:00
add htop, cron job to t-pot playbook
This commit is contained in:
parent
9c1120384b
commit
4585d750e1
1 changed files with 34 additions and 3 deletions
|
@ -132,6 +132,7 @@
|
||||||
- git
|
- git
|
||||||
- gnupg
|
- gnupg
|
||||||
- grc
|
- grc
|
||||||
|
- htop
|
||||||
- micro
|
- micro
|
||||||
- net-tools
|
- net-tools
|
||||||
- vim
|
- vim
|
||||||
|
@ -165,6 +166,7 @@
|
||||||
- exa
|
- exa
|
||||||
- git
|
- git
|
||||||
- grc
|
- grc
|
||||||
|
- htop
|
||||||
- httpd-tools
|
- httpd-tools
|
||||||
- micro
|
- micro
|
||||||
- net-tools
|
- net-tools
|
||||||
|
@ -204,6 +206,7 @@
|
||||||
- exa
|
- exa
|
||||||
- git
|
- git
|
||||||
- grc
|
- grc
|
||||||
|
- htop
|
||||||
- micro
|
- micro
|
||||||
- vim
|
- vim
|
||||||
- wget
|
- wget
|
||||||
|
@ -673,9 +676,9 @@
|
||||||
when: ansible_distribution in ["AlmaLinux", "Debian", "Fedora", "openSUSE Tumbleweed", "Raspbian", "Rocky", "Ubuntu"]
|
when: ansible_distribution in ["AlmaLinux", "Debian", "Fedora", "openSUSE Tumbleweed", "Raspbian", "Rocky", "Ubuntu"]
|
||||||
failed_when: ansible_user_id == "root"
|
failed_when: ansible_user_id == "root"
|
||||||
|
|
||||||
###########################
|
########################################
|
||||||
# T-Pot - Install service #
|
# T-Pot - Install service and cron job #
|
||||||
###########################
|
########################################
|
||||||
|
|
||||||
- name: T-Pot - Install service
|
- name: T-Pot - Install service
|
||||||
hosts: all
|
hosts: all
|
||||||
|
@ -711,3 +714,31 @@
|
||||||
state: stopped
|
state: stopped
|
||||||
enabled: yes
|
enabled: yes
|
||||||
when: ansible_distribution in ["AlmaLinux", "Debian", "Fedora", "openSUSE Tumbleweed", "Raspbian", "Rocky", "Ubuntu"]
|
when: ansible_distribution in ["AlmaLinux", "Debian", "Fedora", "openSUSE Tumbleweed", "Raspbian", "Rocky", "Ubuntu"]
|
||||||
|
|
||||||
|
- name: T-Pot - Setup a randomized daily reboot
|
||||||
|
hosts: all
|
||||||
|
gather_facts: true
|
||||||
|
become: yes
|
||||||
|
tags:
|
||||||
|
- "AlmaLinux"
|
||||||
|
- "Debian"
|
||||||
|
- "Fedora"
|
||||||
|
- "openSUSE Tumbleweed"
|
||||||
|
- "Raspbian"
|
||||||
|
- "Rocky"
|
||||||
|
- "Ubuntu"
|
||||||
|
|
||||||
|
vars:
|
||||||
|
random_minute: "{{ range(0, 60) | random }}"
|
||||||
|
random_hour: "{{ range(0, 5) | random }}" # We want the reboot randomly happen at night
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Setup a randomized daily reboot (All)
|
||||||
|
cron:
|
||||||
|
name: "T-Pot Daily Reboot"
|
||||||
|
user: root
|
||||||
|
minute: "{{ random_minute }}"
|
||||||
|
hour: "{{ random_hour }}"
|
||||||
|
job: "bash -c 'systemctl stop tpot.service && docker container prune -f; docker image prune -f; docker volume prune -f; /usr/sbin/shutdown -r +1 \"T-Pot Daily Reboot\"'"
|
||||||
|
state: present
|
||||||
|
when: ansible_distribution in ["AlmaLinux", "Debian", "Fedora", "openSUSE Tumbleweed", "Raspbian", "Rocky", "Ubuntu"]
|
||||||
|
|
Loading…
Reference in a new issue