Add vimrc

This commit is contained in:
Jeffrey Serio 2023-06-04 12:10:27 -05:00
parent 98fd5fc63b
commit b301937c7d
4 changed files with 68 additions and 21 deletions

View File

@ -1,6 +1,12 @@
--- ---
# tasks file for debian-mail # tasks file for debian-mail
- name: Install vimrc
ansible.builtin.import_role:
name: vimrc
vars:
user: "debian"
- name: Fetch bridge_pubkey.gpg - name: Fetch bridge_pubkey.gpg
ansible.builtin.get_url: ansible.builtin.get_url:
url: https://proton.me/download/bridge/bridge_pubkey.gpg url: https://proton.me/download/bridge/bridge_pubkey.gpg

View File

@ -1,7 +1,6 @@
--- ---
# defaults file for debian-serv # defaults file for debian-serv
vimrc_gist_url: https://gist.github.com/90c3b2fcc9d70cf06e9f3660e0d15a48.git
caddy_pubkey_url: https://dl.cloudsmith.io/public/caddy/stable/gpg.key caddy_pubkey_url: https://dl.cloudsmith.io/public/caddy/stable/gpg.key
caddy_sources_url: https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt caddy_sources_url: https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt
tailscale_pubkey_url: https://pkgs.tailscale.com/stable/debian/bookworm.noarmor.gpg tailscale_pubkey_url: https://pkgs.tailscale.com/stable/debian/bookworm.noarmor.gpg

View File

@ -1,26 +1,11 @@
--- ---
# tasks file for debian-serv # tasks file for debian-serv
- name: Clone vimrc gist - name: Install vimrc
ansible.builtin.git: ansible.builtin.import_role:
repo: "{{ vimrc_gist_url }}" name: vimrc
dest: /tmp/vimrc vars:
user: "debian"
- name: Copy vimrc to /root/.vimrc
ansible.builtin.copy:
src: /tmp/vimrc/.vimrc
dest: /root/.vimrc
remote_src: true
owner: root
group: root
- name: Copy vimrc to /home/debian/.vimrc
ansible.builtin.copy:
src: /tmp/vimrc/.vimrc
dest: /home/debian/.vimrc
remote_src: true
owner: debian
group: debian
- name: Fetch Caddy pubkey - name: Fetch Caddy pubkey
ansible.builtin.get_url: ansible.builtin.get_url:
@ -59,3 +44,37 @@
- caddy - caddy
- tailscale - tailscale
update_cache: true update_cache: true
- name: Fetch molly-brown repo
ansible.builtin.git:
repo: https://tildegit.org/solderpunk/molly-brown.git
dest: /tmp/molly-brown
- name: Build molly-brown binary with Go
ansible.builtin.shell:
cmd: go build
chdir: /tmp/molly-brown
- name: Copy molly-brown binary to /usr/local/bin
ansible.builtin.copy:
src: /tmp/molly-brown/molly-brown
dest: /usr/local/bin/molly-brown
remote_src: true
- name: Copy molly-brown.service for systemd
ansible.builtin.copy:
src: /tmp/molly-brown/contrib/init/molly-brown.service.example
dest: /etc/systemd/system/molly-brown.service
remote_src: true
- name: Set User directive in molly-brown.service
ansible.builtin.lineinfile:
path: /etc/systemd/system/molly-brown.service
search_string: "User=molly"
line: "User={{ ansible_user }}"
- name: Set Group directive in molly-brown.service
ansible.builtin.lineinfile:
path: /etc/systemd/system/molly-brown.service
insertafter: '^User'
line: "Group={{ ansible_user }}"

View File

@ -0,0 +1,23 @@
---
# tasks file for vimrc
- name: Clone vimrc gist
ansible.builtin.git:
repo: https://gist.github.com/90c3b2fcc9d70cf06e9f3660e0d15a48.git
dest: /tmp/vimrc
- name: Copy vimrc to /root/.vimrc
ansible.builtin.copy:
src: /tmp/vimrc/.vimrc
dest: /root/.vimrc
remote_src: true
owner: root
group: root
- name: Copy vimrc to /home/{{ user }}/.vimrc
ansible.builtin.copy:
src: /tmp/vimrc/.vimrc
dest: "/home/{{ user }}/.vimrc"
remote_src: true
owner: "{{ user }}"
group: "{{ user }}"