2025-04-27 11:04:17 +02:00

52 lines
1.2 KiB
YAML

---
##############################################################################
# debian-ubuntu / redhat
- name: include debian/ubuntu specific
include_tasks: debian.yml
when: (ansible_distribution == "Debian" or ansible_distribution == "Ubuntu")
- name: include redhat specific
include_tasks: redhat.yml
when: ansible_distribution == "RedHat"
##############################################################################
- name: "disable sshd X11Forwarding"
copy:
content: "X11Forwarding no"
dest: /etc/ssh/sshd_config.d/x11forwarding.conf
- name: bash profile.d
file:
path: "/etc/profile.d"
state: directory
mode: 0755
- name: bash history
copy:
src: history.sh
dest: /etc/profile.d/history.sh
mode: 0644
- name: /var/backups directory for etcbackup
file:
path: /var/backups
state: directory
mode: 0755
- name: etcbackup
copy:
src: etcbackup.sh
dest: /usr/local/sbin/etcbackup.sh
mode: 0755
- name: etcbackup cron
lineinfile:
dest: /etc/cron.d/etcbackup
regexp: "/usr/local/sbin/etcbackup.sh"
line: "50 22 * * * root /usr/local/sbin/etcbackup.sh"
create: yes
# vim: set tabstop=2 shiftwidth=2 expandtab smarttab: