add ariane host_vars/ariane and role

This commit is contained in:
Daniel A. Maierhofer
2018-02-09 17:07:25 +01:00
parent 6364370baf
commit fb096eaa7d
15 changed files with 260 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
---
- name: git - gitconfig user.name
git_config:
name: user.name
scope: global
value: "root ({{ ansible_hostname }})"
- name: git - gitconfig user.email
git_config:
name: user.email
scope: global
value: "admin@fet.at"
- name: git - gitconfig core.editor
git_config:
name: core.editor
scope: global
value: "vim"
- name: git - init etckeeper
command: etckeeper init creates=/etc/.git/

View File

@@ -0,0 +1,8 @@
---
- name: iptables - install iptables-persistent
apt: name=iptables-persistent
- name: /etc/iptables/rules.v4
template: dest=/etc/iptables/rules.v4 src=iptables_rules_v4.j2 owner=root group=root mode=0644
notify:
iptables restore

View File

@@ -0,0 +1,6 @@
---
- name: logrotate - set backlog
lineinfile:
path: /etc/logrotate.conf
regexp: '^rotate '
line: 'rotate 52'

View File

@@ -0,0 +1,20 @@
---
- include: git.yml
when: ariane_git
tags: ['ariane_git', 'git']
- include: sysctl.yml
when: ariane_sysctl
tags: ['ariane_sysctl', 'sysctl']
- include: logrotate.yml
when: ariane_logrotate
tags: ['ariane_logrotate', 'logrotate']
- include: iptables.yml
when: ariane_iptables
tags: ['ariane_iptables', 'iptables']
- include: zfs.yml
whan: ariane_zfs
tags: ['ariane_zfs', 'zfs']

View File

@@ -0,0 +1,7 @@
---
- name: sysctl - set config
sysctl:
name: "{{ item.key }}"
value: "{{ item.val }}"
sysctl_file: /etc/sysctl.d/01-custom.conf
with_items: "{{ ariane_sysctls }}"

View File

@@ -0,0 +1,36 @@
---
# uname headers package fehlt noch
- name: zfs - install ZoL dkms
apt: name=zfs-dkms state=latest
- name: zfs - install ZoL utils
apt: name=zfsutils-linux state=latest
- name: zfs - load module
modprobe: name=zfs
notify: zfs restart
- name: zfs - set quota
zfs: "name={{ item }} state=present quota=1T"
with_items:
- zv1/daten
- zv1/fotos
- zv1/homes
- name: zfs - pool scrub cronjob for zv1
cron:
name: zfs scrub zv1
minute: 5
hour: 1
weekday: 1
job: "/sbin/zpool scrub zv1"
- name: zfs - pool scrub cronjob for ssd
cron:
name: zfs scrub ssd
minute: 5
hour: 1
weekday: 0
job: "/sbin/zpool scrub ssd"