55 lines
1.3 KiB
YAML
55 lines
1.3 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
|
|
when:
|
|
- (ansible_distribution == "Debian" and ansible_distribution_major_version|int() >= 11) or
|
|
(ansible_distribution == "RedHat")
|
|
|
|
- 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:
|