From 26e084fc77fc14f40b9d201285877d785623bd62 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Wed, 10 Mar 2021 10:42:54 +0000 Subject: [PATCH] Replace DabApps things with Torchbox Also migrate to using host variables rather than a magic list --- dotfiles.yml | 4 ++-- files/crab.service | 22 --------------------- files/gitconfig.conf | 7 ++----- host_vars/big-mike.yml | 1 + tasks/dabapps.yml | 43 ------------------------------------------ tasks/dev.yml | 1 - tasks/torchbox.yml | 20 ++++++++++++++++++++ vars.yml | 3 --- 8 files changed, 25 insertions(+), 76 deletions(-) delete mode 100644 files/crab.service create mode 100644 host_vars/big-mike.yml delete mode 100644 tasks/dabapps.yml create mode 100644 tasks/torchbox.yml diff --git a/dotfiles.yml b/dotfiles.yml index b99dd04..23b478d 100644 --- a/dotfiles.yml +++ b/dotfiles.yml @@ -37,8 +37,8 @@ - import_tasks: tasks/dev.yml - import_tasks: tasks/media.yml - - import_tasks: tasks/dabapps.yml - when: ansible_fqdn in dabapps_hostnames + - import_tasks: tasks/torchbox.yml + when: is_torchbox - import_tasks: tasks/mac.yml when: "'Mac' in ansible_facts.product_name" diff --git a/files/crab.service b/files/crab.service deleted file mode 100644 index e51edbc..0000000 --- a/files/crab.service +++ /dev/null @@ -1,22 +0,0 @@ -[Unit] -Description=Crab Router -Wants=network-online.target -After=network-online.target - -[Service] -Type=simple -User={{ user }} -ExecStart=/usr/bin/crab router -Environment="CRAB_ROUTER_HOST=0.0.0.0" - -# Allow port 80 bind -AmbientCapabilities=CAP_NET_BIND_SERVICE -NoNewPrivileges=yes - -# More protections, because why not -PrivateDevices=yes -PrivateTmp=yes -ProtectSystem=full - -[Install] -RequiredBy=multi-user.target diff --git a/files/gitconfig.conf b/files/gitconfig.conf index f901de3..4572dfb 100644 --- a/files/gitconfig.conf +++ b/files/gitconfig.conf @@ -22,8 +22,8 @@ amend = commit --amend --no-edit [include] -{% if ansible_fqdn == "TOO-Work" %} - path = ~/.dotfiles/git/work.conf +{% if is_torchbox %} + path = ~/.dotfiles/git/torchbox.conf {% else %} path = ~/.dotfiles/git/personal.conf {% endif %} @@ -34,8 +34,5 @@ [includeIf "gitdir:~/Repositories/"] path = ~/.dotfiles/git/personal.conf -[includeIf "gitdir:~/DabApps/"] - path = ~/.dotfiles/git/work.conf - [includeIf "gitdir:~/SR/"] path = ~/.dotfiles/git/personal.conf diff --git a/host_vars/big-mike.yml b/host_vars/big-mike.yml new file mode 100644 index 0000000..4dd9d5e --- /dev/null +++ b/host_vars/big-mike.yml @@ -0,0 +1 @@ +is_torchbox: true diff --git a/tasks/dabapps.yml b/tasks/dabapps.yml deleted file mode 100644 index 8b1a658..0000000 --- a/tasks/dabapps.yml +++ /dev/null @@ -1,43 +0,0 @@ -- name: Install DabApps packages - aur: - name: "{{ item }}" - become: true - become_user: aur_builder - loop: - - heroku-cli - - ngrok - - python-aws-mfa - -- name: Clone DabApps Dotfiles - git: - repo: git@github.com:dabapps/dotfiles - dest: "{{ home }}/Projects/dotfiles" - force: true - become: true - become_user: "{{ user }}" - -- name: Install DabApps EditorConfig - file: - src: "{{ home }}/Projects/dotfiles/.editorconfig" - dest: "{{ home }}/Projects/.editorconfig" - mode: 0644 - owner: "{{ user }}" - state: link - force: true - -- name: Install Crab service - template: - src: ./files/crab.service - dest: /etc/systemd/system/crab.service - mode: 0644 - owner: root - group: root - -- name: Install Zoom - aur: - name: "{{ item }}" - become: true - become_user: aur_builder - loop: - - zoom - - zoom-firejail diff --git a/tasks/dev.yml b/tasks/dev.yml index f662ceb..5fbfc7c 100644 --- a/tasks/dev.yml +++ b/tasks/dev.yml @@ -18,7 +18,6 @@ - arduino - arduino-cli - arduino-builder - - aws-cli - docker - docker-compose - firefox-developer-edition diff --git a/tasks/torchbox.yml b/tasks/torchbox.yml new file mode 100644 index 0000000..34cbeab --- /dev/null +++ b/tasks/torchbox.yml @@ -0,0 +1,20 @@ +- name: Install Torchbox packages + aur: + name: "{{ item }}" + become: true + become_user: aur_builder + loop: + - aws-cli + - fabric + - heroku-cli + - python-aws-mfa + - vagrant + +- name: Install Zoom + aur: + name: "{{ item }}" + become: true + become_user: aur_builder + loop: + - zoom + - zoom-firejail diff --git a/vars.yml b/vars.yml index a280619..e7e8c9d 100644 --- a/vars.yml +++ b/vars.yml @@ -1,6 +1,3 @@ user: jake home: /home/{{ user }} -dabapps_hostnames: - - TOO-Work - - big-mike ntp_timezone: Europe/London