1
0
forked from infra/ansible

Add common role.

This commit is contained in:
Markus 2015-12-13 18:54:49 +01:00
parent f354af18a8
commit 7ca8e1ad50
7 changed files with 2901 additions and 0 deletions

2790
roles/common/files/.zshrc Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,13 @@
# completion
autoload -U compinit
compinit
# cache for the completion
zstyle ':completion::complete:*' use-cache 1
# promt
autoload -U promptinit
promptinit
#prompt gentoo

View File

@ -0,0 +1,4 @@
---
- name: restart snmpd
service: name=snmpd state=restarted

View File

@ -0,0 +1,31 @@
---
- name: Install snmpd
apt: name=snmpd state=present
tags: snmp
- name: Configure snmpd
template: src=snmpd.conf.j2 dest=/etc/snmp/snmpd.conf
tags: snmp
notify: restart snmpd
- name: Start the snmpd service
service: name=snmpd state=started enabled=yes
tags: snmp
- name: Install misc software
apt: name={{ item }} state=present
with_items:
- htop
- pydf
- vim-nox
- zsh
- name: Configure misc software
copy: src={{ item.src }} dest={{ item.dest }}
with_items:
- { src: '.zshrc', dest: '/root/.zshrc' }
- { src: '.zshrc.local', dest: '/root/.zshrc.local' }
- name: Set shell for root user
user: name=root shell=/bin/zsh

View File

@ -0,0 +1,26 @@
---
- name: Install snmpd
pkgng: name=net-snmp state=present
tags: snmp
- name: Configure snmpd
template: src=snmpd.conf.j2 dest=/usr/local/etc/snmpd.conf
tags: snmp
notify: restart snmpd
- name: Start the snmpd service
service: name=snmpd state=started enabled=yes
tags: snmp
- name: Install misc software
pkgng: name={{ item }} state=present
with_items:
- vim-lite
- zsh
- name: Configure misc software
copy: src={{ item.src }} dest={{ item.dest }}
with_items:
- { src: '.zshrc', dest: '/root/.zshrc' }
- { src: '.zshrc.local', dest: '/root/.zshrc.local' }

View File

@ -0,0 +1,8 @@
---
# This playbook contains common plays that will be run on all nodes.
- include: Debian.yml
when: ansible_os_family == 'Debian'
- include: FreeBSD.yml
when: ansible_distribution == 'FreeBSD'

View File

@ -0,0 +1,29 @@
###############################################################################
#
# AGENT BEHAVIOUR
#
# Listen for connections on all interfaces, IPv4 only
agentAddress udp:161
###############################################################################
#
# ACCESS CONTROL
#
rocommunity public 127.0.0.1
{% for srv in snmp_allowed %}
rocommunity public {{ srv }}
{% endfor %}
###############################################################################
#
# SYSTEM INFORMATION
#
sysLocation Binary Kitchen e.V., Regensburg, Germany
syscontact Markus Hauschild <moepman@binary-kitchen.de>