From 2dcf9846ae3ead1678b35275f36537b56857ad01 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Tue, 16 Apr 2019 13:17:19 +0200 Subject: [PATCH] start ansible project for hypervisors and non nix hosts, switch to ansible for ease of existence --- ansible/ansible.cfg | 5 +++++ ansible/hosts | 5 +++++ ansible/hypervisor.yml | 5 +++++ ansible/roles/proxmox/tasks/main.yml | 25 +++++++++++++++++++++++++ 4 files changed, 40 insertions(+) create mode 100644 ansible/ansible.cfg create mode 100644 ansible/hosts create mode 100644 ansible/hypervisor.yml create mode 100644 ansible/roles/proxmox/tasks/main.yml diff --git a/ansible/ansible.cfg b/ansible/ansible.cfg new file mode 100644 index 00000000..0a7eb0d4 --- /dev/null +++ b/ansible/ansible.cfg @@ -0,0 +1,5 @@ +[defaults] + +# some basic default values... + +inventory = ./hosts \ No newline at end of file diff --git a/ansible/hosts b/ansible/hosts new file mode 100644 index 00000000..bae11c49 --- /dev/null +++ b/ansible/hosts @@ -0,0 +1,5 @@ +[hypervisor] +server3.hq.c3d2.de +server4.hq.c3d2.de +server5.hq.c3d2.de +server6.hq.c3d2.de diff --git a/ansible/hypervisor.yml b/ansible/hypervisor.yml new file mode 100644 index 00000000..8004c1ab --- /dev/null +++ b/ansible/hypervisor.yml @@ -0,0 +1,5 @@ +--- +# file: hypervisor.yml +- hosts: hypervisor + roles: + - proxmox diff --git a/ansible/roles/proxmox/tasks/main.yml b/ansible/roles/proxmox/tasks/main.yml new file mode 100644 index 00000000..bd9b3528 --- /dev/null +++ b/ansible/roles/proxmox/tasks/main.yml @@ -0,0 +1,25 @@ +--- +- name: Update all packages to the latest version + apt: + upgrade: dist +- name: Install packages + apt: + name: "{{ packages }}" + vars: + packages: + - zsh + - iotop + - latencytop + - htop + +- name: Cloning oh-my-zsh + git: + repo=https://github.com/robbyrussell/oh-my-zsh + dest=~/.oh-my-zsh + +- name: Link ~/.zshrc + file: + src: /etc/pve/zshrc + dest: ~/.zshrc + state: link + force: yes \ No newline at end of file