Replace DabApps things with Torchbox

Also migrate to using host variables rather than a magic list
This commit is contained in:
Jake Howard 2021-03-10 10:42:54 +00:00
parent 183972549f
commit 26e084fc77
Signed by: jake
GPG Key ID: 57AFB45680EDD477
8 changed files with 25 additions and 76 deletions

View File

@ -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"

View File

@ -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

View File

@ -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

1
host_vars/big-mike.yml Normal file
View File

@ -0,0 +1 @@
is_torchbox: true

View File

@ -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

View File

@ -18,7 +18,6 @@
- arduino
- arduino-cli
- arduino-builder
- aws-cli
- docker
- docker-compose
- firefox-developer-edition

20
tasks/torchbox.yml Normal file
View File

@ -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

View File

@ -1,6 +1,3 @@
user: jake
home: /home/{{ user }}
dabapps_hostnames:
- TOO-Work
- big-mike
ntp_timezone: Europe/London