mirror of
https://codeberg.org/hyperreal/ansible-homelab
synced 2024-11-01 08:33:07 +01:00
Add vimrc
This commit is contained in:
parent
98fd5fc63b
commit
b301937c7d
@ -1,6 +1,12 @@
|
||||
---
|
||||
# tasks file for debian-mail
|
||||
|
||||
- name: Install vimrc
|
||||
ansible.builtin.import_role:
|
||||
name: vimrc
|
||||
vars:
|
||||
user: "debian"
|
||||
|
||||
- name: Fetch bridge_pubkey.gpg
|
||||
ansible.builtin.get_url:
|
||||
url: https://proton.me/download/bridge/bridge_pubkey.gpg
|
||||
|
@ -1,7 +1,6 @@
|
||||
---
|
||||
# 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_sources_url: https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt
|
||||
tailscale_pubkey_url: https://pkgs.tailscale.com/stable/debian/bookworm.noarmor.gpg
|
||||
|
@ -1,26 +1,11 @@
|
||||
---
|
||||
# tasks file for debian-serv
|
||||
|
||||
- name: Clone vimrc gist
|
||||
ansible.builtin.git:
|
||||
repo: "{{ vimrc_gist_url }}"
|
||||
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/debian/.vimrc
|
||||
ansible.builtin.copy:
|
||||
src: /tmp/vimrc/.vimrc
|
||||
dest: /home/debian/.vimrc
|
||||
remote_src: true
|
||||
owner: debian
|
||||
group: debian
|
||||
- name: Install vimrc
|
||||
ansible.builtin.import_role:
|
||||
name: vimrc
|
||||
vars:
|
||||
user: "debian"
|
||||
|
||||
- name: Fetch Caddy pubkey
|
||||
ansible.builtin.get_url:
|
||||
@ -59,3 +44,37 @@
|
||||
- caddy
|
||||
- tailscale
|
||||
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 }}"
|
||||
|
23
roles/vimrc/tasks/main.yml
Normal file
23
roles/vimrc/tasks/main.yml
Normal 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 }}"
|
Loading…
Reference in New Issue
Block a user