Split into roles and add parameters

This commit is contained in:
Paul-Henri Froidmont 2017-12-08 01:45:42 +01:00
parent 13b5d45998
commit 7d8e261f6d
19 changed files with 93 additions and 37 deletions

3
roles/base/README.md Normal file
View file

@ -0,0 +1,3 @@
base
====
Installs Ansible prerequisites if needed and than installs basic utility packages

View file

@ -0,0 +1,5 @@
#!/bin/bash
set -e
#pacman -Syu --noconfirm #Skip this step because reboot is needed to start docker in case of kernel update
pacman -S python --noconfirm
touch /root/.ansible_prerequisites_installed

14
roles/base/tasks/main.yml Normal file
View file

@ -0,0 +1,14 @@
---
- name: Install ansible prerequisites
script: ansible_prerequisites.sh creates=/root/.ansible_prerequisites_installed
- name: Install base packages
package: name={{item}} state=present update_cache=yes
with_items:
- htop
- git
- nload
- rsync
- ufw
- vim
- wget
- zsh