diff --git a/ansible-playbook b/ansible-playbook new file mode 100755 index 0000000..d6d641f --- /dev/null +++ b/ansible-playbook @@ -0,0 +1,3 @@ +#/bin/bash +source .env_ansible/bin/activate +ansible-playbook "$@" \ No newline at end of file diff --git a/group_vars/all b/group_vars/all index 2240771..3a0ca7a 100644 --- a/group_vars/all +++ b/group_vars/all @@ -1,8 +1,45 @@ --- common_aliases: - "root: bofh@fet.at" -common_hostname: False -common_apt: False -common_rsyslog: False -common_resolvconf: True -nocows: True \ No newline at end of file +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 + diff --git a/group_vars/ruby b/group_vars/ruby new file mode 100644 index 0000000..c75bcf3 --- /dev/null +++ b/group_vars/ruby @@ -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 diff --git a/hosts/production b/hosts/production index 7ce8a9b..d3d31b7 100644 --- a/hosts/production +++ b/hosts/production @@ -3,3 +3,6 @@ [backupclient] 10.0.3.161 + +[ruby] +10.0.3.40 \ No newline at end of file diff --git a/hosts/test_andi b/hosts/test_andi index 22e4bcd..d52592e 100644 --- a/hosts/test_andi +++ b/hosts/test_andi @@ -1,2 +1,4 @@ [test_ruby] -test01 #10.0.3.246 \ No newline at end of file +test01 +[test_common] +test02 \ No newline at end of file diff --git a/install b/install new file mode 100755 index 0000000..580c7f9 --- /dev/null +++ b/install @@ -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 diff --git a/roles/backupclient/tasks/borg.yml b/roles/backupclient/tasks/borg.yml index 7610993..83a7122 100644 --- a/roles/backupclient/tasks/borg.yml +++ b/roles/backupclient/tasks/borg.yml @@ -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: diff --git a/site.yml b/site.yml index 0ce4e77..9306c80 100644 --- a/site.yml +++ b/site.yml @@ -1,4 +1,4 @@ - +--- - hosts: backup user: root become: False @@ -13,3 +13,9 @@ - common - backupclient +- hosts: ruby + user: root + become: False + roles: + - common +