First playbook, yey

This commit is contained in:
2020-07-15 17:13:33 +02:00
parent 860423bc22
commit b63b02ed02
3 changed files with 46 additions and 0 deletions

9
hosts Normal file
View File

@@ -0,0 +1,9 @@
[all]
homecloud00
homecloud01
homecloud02
homecloud03
homecloud04
homecloud05
homecloud06
homecloud07

34
playbook.yml Normal file
View File

@@ -0,0 +1,34 @@
- hosts: all
tasks:
- name: Update and upgrade apt packages
become: true
apt:
upgrade: yes
update_cache: yes
cache_valid_time: 86400 #One day
- name: Install monitoring packages
apt:
pkg:
- htop
- iftop
- iotop
- glances
state: present
- name: Create sudo group
group:
name: sudo
state: present
- name: Create feedc0de user
user:
name: feedc0de
groups: sudo
state: present
- name: Install glusterfs packages
apt:
pkg:
- glusterfs-server
state: present

3
start.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/sh
ansible-playbook playbook.yml -i hosts