From 04ea9a24263da910588ba7a802b1ba016913ee29 Mon Sep 17 00:00:00 2001 From: Olli Graf Date: Thu, 22 Jul 2021 13:26:37 +0200 Subject: [PATCH] =?UTF-8?q?Role=20f=C3=BCr=20Pi=20Initialisierung.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hosts | 1 + initpi.yml | 7 +++++++ roles/initpi/tasks/main.yml | 22 ++++++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 initpi.yml create mode 100644 roles/initpi/tasks/main.yml diff --git a/hosts b/hosts index e6a66ae..ec581ed 100644 --- a/hosts +++ b/hosts @@ -8,6 +8,7 @@ all: willie: hans: cleatus: + barney: vars: ansible_python_interpreter: /usr/bin/python3 ansible_connection: ssh diff --git a/initpi.yml b/initpi.yml new file mode 100644 index 0000000..3d60dd3 --- /dev/null +++ b/initpi.yml @@ -0,0 +1,7 @@ +--- +- hosts: "{{ target }}" + gather_facts: false + remote_user: pi + roles: + - initpi + diff --git a/roles/initpi/tasks/main.yml b/roles/initpi/tasks/main.yml new file mode 100644 index 0000000..51170ed --- /dev/null +++ b/roles/initpi/tasks/main.yml @@ -0,0 +1,22 @@ +- name: Pakete installieren + become: true + apt: + name: + - neofetch + - htop + - cowsay + - docker.io + update_cache: yes + cache_valid_time: 86400 + autoremove: yes +- name: Permission für Docker + become: true + file: path=/var/run/docker.sock mode=0660 +# mode: 660 +- name: adding user pi to docker group + become: true + user: + name: pi + groups: docker + +