From 2cbf555a9d83ec4be0485609a3def65e195dbe31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geoffrey=20=E2=80=9CFrogeye=E2=80=9D=20Preud=27homme?= Date: Sun, 13 Jun 2021 14:46:01 +0200 Subject: [PATCH] Reorganized automatrop hosts --- config/automatrop/group_vars/all | 17 +++++++++++++++++ .../host_vars/curacao.geoffrey.frogeye.fr | 9 +++++++++ .../host_vars/pindakaas.geoffrey.frogeye.fr | 6 ++++++ config/automatrop/hosts | 7 +++---- config/automatrop/playbooks/default.yml | 6 ++++-- config/automatrop/roles/access/tasks/main.yml | 12 ++++++++++++ .../automatrop/roles/dotfiles/handlers/main.yml | 2 ++ config/automatrop/roles/dotfiles/tasks/main.yml | 9 +++++++++ .../roles/dotfiles/templates/rssVideos.j2 | 7 +++++++ 9 files changed, 69 insertions(+), 6 deletions(-) create mode 100644 config/automatrop/group_vars/all create mode 100644 config/automatrop/host_vars/curacao.geoffrey.frogeye.fr create mode 100644 config/automatrop/host_vars/pindakaas.geoffrey.frogeye.fr create mode 100644 config/automatrop/roles/access/tasks/main.yml create mode 100644 config/automatrop/roles/dotfiles/handlers/main.yml create mode 100644 config/automatrop/roles/dotfiles/tasks/main.yml create mode 100644 config/automatrop/roles/dotfiles/templates/rssVideos.j2 diff --git a/config/automatrop/group_vars/all b/config/automatrop/group_vars/all new file mode 100644 index 0000000..001e199 --- /dev/null +++ b/config/automatrop/group_vars/all @@ -0,0 +1,17 @@ +# Default values + +# If you have root access on the machine (via sudo) +root_access: no + +# Display server (no, "x11", "wayland") +display_server: no + +# What development work will I do on this machine +dev_stuffs: [] + +# Install software that is rarely used +software_full: no + +# Which additional software to install +software_snippets: [] + diff --git a/config/automatrop/host_vars/curacao.geoffrey.frogeye.fr b/config/automatrop/host_vars/curacao.geoffrey.frogeye.fr new file mode 100644 index 0000000..4108bd9 --- /dev/null +++ b/config/automatrop/host_vars/curacao.geoffrey.frogeye.fr @@ -0,0 +1,9 @@ +root_access: yes +display_manager: "x11" +dev_stuffs: + - python + - shell + - network + - ansible + - docker +software_full: yes diff --git a/config/automatrop/host_vars/pindakaas.geoffrey.frogeye.fr b/config/automatrop/host_vars/pindakaas.geoffrey.frogeye.fr new file mode 100644 index 0000000..957619b --- /dev/null +++ b/config/automatrop/host_vars/pindakaas.geoffrey.frogeye.fr @@ -0,0 +1,6 @@ +root_access: yes +display_manager: "x11" +dev_stuffs: + - shell + - network + - ansible diff --git a/config/automatrop/hosts b/config/automatrop/hosts index 75ad3c7..724017c 100644 --- a/config/automatrop/hosts +++ b/config/automatrop/hosts @@ -1,4 +1,3 @@ -localhost -#curacao.geoffrey.frogeye.fr -#triffle.geoffrey.frogeye.fr -#bufobufo.frogeye.nl +curacao.geoffrey.frogeye.fr +# triffle.geoffrey.frogeye.fr +pindakaas.geoffrey.frogeye.fr diff --git a/config/automatrop/playbooks/default.yml b/config/automatrop/playbooks/default.yml index 625aba6..56c5051 100644 --- a/config/automatrop/playbooks/default.yml +++ b/config/automatrop/playbooks/default.yml @@ -1,12 +1,14 @@ - name: Default hosts: all roles: + - role: access + tags: access - role: software tags: software + - role: dotfiles + tags: dotfiles - role: mnussbaum.base16-builder-ansible # Required for color tags: color - role: color tags: color - - role: vdirsyncer - tags: vdirsyncer diff --git a/config/automatrop/roles/access/tasks/main.yml b/config/automatrop/roles/access/tasks/main.yml new file mode 100644 index 0000000..c7015f3 --- /dev/null +++ b/config/automatrop/roles/access/tasks/main.yml @@ -0,0 +1,12 @@ +- name: Enable passwordless sudo access to wheel group + lineinfile: + path: /etc/sudoers + line: "%wheel ALL=(ALL) NOPASSWD: ALL" + regexp: "^#? *%wheel ALL=\\(ALL\\) NOPASSWD: ALL$" + become: yes + +- name: Remove Manjaro installer sudoers override + file: + path: /etc/sudoers.d/10-installer + state: absent + become: yes diff --git a/config/automatrop/roles/dotfiles/handlers/main.yml b/config/automatrop/roles/dotfiles/handlers/main.yml new file mode 100644 index 0000000..e190624 --- /dev/null +++ b/config/automatrop/roles/dotfiles/handlers/main.yml @@ -0,0 +1,2 @@ +- name: install dotfiles + command: "{{ ansible_user_dir }}/.dotfiles/config/scripts/dotfiles install" diff --git a/config/automatrop/roles/dotfiles/tasks/main.yml b/config/automatrop/roles/dotfiles/tasks/main.yml new file mode 100644 index 0000000..db9e374 --- /dev/null +++ b/config/automatrop/roles/dotfiles/tasks/main.yml @@ -0,0 +1,9 @@ +- name: Install dotfiles repository + git: + repo: https://git.frogeye.fr/geoffrey/dotfiles.git + dest: "{{ ansible_user_dir }}/.dotfiles" + notify: install dotfiles + +# - name: Install python dependencies for scripts +# pip: +# requirements: "{{ ansible_user_dir }}/.dotfiles/config/scripts/requirements.txt" diff --git a/config/automatrop/roles/dotfiles/templates/rssVideos.j2 b/config/automatrop/roles/dotfiles/templates/rssVideos.j2 new file mode 100644 index 0000000..4740ef1 --- /dev/null +++ b/config/automatrop/roles/dotfiles/templates/rssVideos.j2 @@ -0,0 +1,7 @@ +{% set hostname = 'rss.frogeye.fr' %} +{% set user = 'geoffrey' %} +feed=https://{{ hostname }}/i/?a=rss&user={{ user }}&token={{ query('community.general.passwordstore', 'http/' + hostname + '/' + user + 'subkey=token' ) }}&hours=17520 +videos=~/Téléchargements/RSS +subtitles=true +max-duration=7200 +format=bestvideo[height<=1440]+bestaudio/best