mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-04-20 06:02:24 +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
|
||||
- gnupg
|
||||
- grc
|
||||
- htop
|
||||
- micro
|
||||
- net-tools
|
||||
- vim
|
||||
|
@ -165,6 +166,7 @@
|
|||
- exa
|
||||
- git
|
||||
- grc
|
||||
- htop
|
||||
- httpd-tools
|
||||
- micro
|
||||
- net-tools
|
||||
|
@ -204,6 +206,7 @@
|
|||
- exa
|
||||
- git
|
||||
- grc
|
||||
- htop
|
||||
- micro
|
||||
- vim
|
||||
- wget
|
||||
|
@ -673,9 +676,9 @@
|
|||
when: ansible_distribution in ["AlmaLinux", "Debian", "Fedora", "openSUSE Tumbleweed", "Raspbian", "Rocky", "Ubuntu"]
|
||||
failed_when: ansible_user_id == "root"
|
||||
|
||||
###########################
|
||||
# T-Pot - Install service #
|
||||
###########################
|
||||
########################################
|
||||
# T-Pot - Install service and cron job #
|
||||
########################################
|
||||
|
||||
- name: T-Pot - Install service
|
||||
hosts: all
|
||||
|
@ -711,3 +714,31 @@
|
|||
state: stopped
|
||||
enabled: yes
|
||||
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