This commit is contained in:
Andreas Stephanides
2017-11-05 22:30:33 +01:00
8 changed files with 76 additions and 7 deletions

3
ansible-playbook Executable file
View File

@@ -0,0 +1,3 @@
#/bin/bash
source .env_ansible/bin/activate
ansible-playbook "$@"

View File

@@ -1,8 +1,45 @@
---
common_aliases:
- "root: bofh@fet.at"
common_hostname: False
common_apt: False
common_rsyslog: False
common_resolvconf: True
common_hostname: True
common_rsyslog: True
common_openssh_permit_root_login: "yes"
common_resolvconf_nameservers: ["10.0.3.1", "192.168.0.1", "8.8.8.8"]
common_resolvconf: False
nocows: True
common_locales:
- name: 'de_AT.UTF-8'
state: "present"
# apt-get common config
common_apt: True
common_apt_repositories:
- "deb http://gd.tuwien.ac.at/opsys/linux/debian {{ ansible_distribution_release }} main contrib non-free"
- "deb http://gd.tuwien.ac.at/opsys/linux/debian/ {{ ansible_distribution_release }}-backports main contrib non-free"
- "deb http://security.debian.org/debian-security {{ ansible_distribution_release }}/updates main contrib non-free"
common_vim_default: False
common_basic_packages:
- curl
- emacs-nox
- git
- htop
- iputils-ping
- mtr-tiny
- ncdu
- strace
- sudo
- tmux
- tree
- vim
- zsh
# for ansible/debian
- lsb-release
- python-apt
- python-pycurl

10
group_vars/ruby Normal file
View File

@@ -0,0 +1,10 @@
---
common_aliases:
- "root: bofh@fet.at"
common_hostname: False
common_apt: True
common_rsyslog: False
common_resolvconf: True
common_resolvconf_nameservers:[ "192.168.0.1", "8.8.8.8"]
common_basic_packages:
- curl

View File

@@ -3,3 +3,6 @@
[backupclient]
10.0.3.161
[ruby]
10.0.3.40

View File

@@ -1,2 +1,4 @@
[test_ruby]
test01 #10.0.3.246
test01
[test_common]
test02

7
install Executable file
View File

@@ -0,0 +1,7 @@
#/bin/bash
if [ ! -d ".env_ansible" ]; then
virtualenv .env_ansible
fi
source .env_ansible/bin/activate
pip install --upgrade pip
pip install ansible

View File

@@ -14,6 +14,7 @@
- name: fetch pubickey
shell: "cat /home/borg_backup/.ssh/id_rsa.pub"
register: id_rsa_pub
changed_when: false
- name: Add authorized key to borg backup servers
authorized_key:

View File

@@ -1,4 +1,4 @@
---
- hosts: backup
user: root
become: False
@@ -13,3 +13,9 @@
- common
- backupclient
- hosts: ruby
user: root
become: False
roles:
- common