Commit 40c07544 authored by bbguimaraes's avatar bbguimaraes
Browse files

ansible: separate tasks which need Nextcloud files

parent e180c5c7
- hosts: desktops
vars:
home: '{{ ansible_env.HOME }}'
src_dir: '{{ home }}/src'
tmp_dir: "{{ ansible_env.TMPDIR|default('tmp') }}"
tasks:
- name: clone repositories
git:
repo: https://git.bbguimaraes.com/{{ item.0 }}.git
dest: "{{ src_dir }}/{{ item.0 }}"
version: "{{ item.1 }}"
update: no
loop:
- ["impero", "master"]
- ["subs", "lbry"]
- name: build programs (autotools)
include_tasks: autotools.yaml
vars:
target: impero
target_bin: impero
dir: "{{ src_dir }}/impero"
- name: build programs (autotools)
make:
chdir: "{{ src_dir }}/{{ item }}"
loop:
- subs
- name: create home directories
file:
state: directory
path: '{{ home }}/{{ item }}'
loop:
- .config/gdb
- .config/git
- .config/i3
- .config/i3status
- .config/impero
- .config/khal
- .config/offlineimap
- .config/ripgrep
- .config/tig
- .config/vdirsyncer
- .local/bin
- .local/share/subs
- .local/share/systemd/user
- .local/share/tig
- .mutt
- .vim/colors
- .vim/spell
- name: setup dotfile symlinks
file:
state: link
src: '{{ src_dir }}/dotfiles/{{ item.0 }}'
dest: '{{ home }}/{{ item.1 }}'
loop:
- ['gdb/init', '.config/gdb/gdbinit']
- ['git/tigrc', '.config/tig/config']
- ['i3/config', '.config/i3/config']
- ['i3/status', '.config/i3status/config']
- ['khal/khal.conf', '.config/khal/config']
- ['khal/vdirsyncer.conf', '.config/vdirsyncer/config']
- ['khal/vdirsyncer.service',
'.local/share/systemd/user/vdirsyncer.service']
- ['khal/vdirsyncer.sh', '.config/vdirsyncer/run.sh']
- ['mutt/msmtprc', '.msmtprc']
- ['mutt/muttrc', '.mutt/muttrc']
- ['mutt/mailcap', '.mutt/mailcap']
- ['offlineimap/offlineimap@.service',
'.local/share/systemd/user/offlineimap@.service']
- ['redshift.conf', '.config/redshift.conf']
- ['ripgrep', '.config/ripgrep/config']
- ['user-dirs.dirs', '.config/user-dirs.dirs']
- ['vim/preto.vim', '.vim/colors/preto.vim']
- ['xorg/xinitrc', '.xinitrc']
- ['xorg/Xresources', '.Xresources']
......@@ -33,6 +33,7 @@
src: '{{ item.0 }}'
dest: '{{ home }}/{{ item.1 }}'
loop:
- ['{{ home }}/n/comp/scripts/dev.sh', '.local/bin/d']
- ['{{ home }}/n/archive/money', '.local/share/nummi/db']
- ['{{ home }}/src/proton-bridge/proton-bridge', '.local/bin/proton-bridge']
- name: enable and start services
......
- hosts: desktops
tags: base
vars:
home: '{{ ansible_env.HOME }}'
src_dir: '{{ home }}/src'
tmp_dir: "{{ ansible_env.TMPDIR|default('tmp') }}"
tasks:
- name: clone repositories
git:
repo: https://git.bbguimaraes.com/{{ item.0 }}.git
dest: "{{ src_dir }}/{{ item.0 }}"
version: "{{ item.1 }}"
update: no
loop:
- ["impero", "master"]
- ["subs", "lbry"]
- name: build programs (autotools)
include_tasks: autotools.yaml
vars:
target: impero
target_bin: impero
dir: "{{ src_dir }}/impero"
- name: build programs (autotools)
make:
chdir: "{{ src_dir }}/{{ item }}"
loop:
- subs
- name: create home directories
file:
state: directory
path: '{{ home }}/{{ item }}'
loop:
- .config/gdb
- .config/git
- .config/i3
- .config/i3status
- .config/impero
- .config/khal
- .config/offlineimap
- .config/ripgrep
- .config/tig
- .config/vdirsyncer
- .local/bin
- .local/share/subs
- .local/share/systemd/user
- .local/share/tig
- .mutt
- .vim/colors
- .vim/spell
- name: setup dotfile symlinks
file:
state: link
src: '{{ src_dir }}/dotfiles/{{ item.0 }}'
dest: '{{ home }}/{{ item.1 }}'
loop:
- ['gdb/init', '.config/gdb/gdbinit']
- ['git/tigrc', '.config/tig/config']
- ['i3/config', '.config/i3/config']
- ['i3/status', '.config/i3status/config']
- ['khal/khal.conf', '.config/khal/config']
- ['khal/vdirsyncer.conf', '.config/vdirsyncer/config']
- ['khal/vdirsyncer.service',
'.local/share/systemd/user/vdirsyncer.service']
- ['khal/vdirsyncer.sh', '.config/vdirsyncer/run.sh']
- ['mutt/msmtprc', '.msmtprc']
- ['mutt/muttrc', '.mutt/muttrc']
- ['mutt/mailcap', '.mutt/mailcap']
- ['offlineimap/offlineimap@.service',
'.local/share/systemd/user/offlineimap@.service']
- ['redshift.conf', '.config/redshift.conf']
- ['ripgrep', '.config/ripgrep/config']
- ['user-dirs.dirs', '.config/user-dirs.dirs']
- ['vim/preto.vim', '.vim/colors/preto.vim']
- ['xorg/xinitrc', '.xinitrc']
- ['xorg/Xresources', '.Xresources']
- name: setup other symlinks
file:
state: link
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment