Move systemd tasks to different repo
This commit is contained in:
parent
7c882c217d
commit
04b868c65e
6 changed files with 37 additions and 89 deletions
|
|
@ -1,7 +1 @@
|
||||||
- name: restart ssh-agent
|
|
||||||
systemd:
|
|
||||||
name: ssh-agent
|
|
||||||
state: restarted
|
|
||||||
enabled: yes
|
|
||||||
daemon-reload: yes
|
|
||||||
scope: user
|
|
||||||
|
|
|
||||||
33
roles/development/tasks/coc.yml
Normal file
33
roles/development/tasks/coc.yml
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
- name: install coc.nvim node packages
|
||||||
|
npm:
|
||||||
|
path: "{{ xdg_data_dir }}/nvim/site/pack/default/start/coc.nvim"
|
||||||
|
state: present
|
||||||
|
global: false
|
||||||
|
|
||||||
|
- name: create default coc.nvim venv directory
|
||||||
|
file:
|
||||||
|
path: "{{ ansible_env.HOME }}/.local/lib/coc"
|
||||||
|
state: directory
|
||||||
|
mode: "0755"
|
||||||
|
|
||||||
|
- name: copy coc pyproject.toml
|
||||||
|
template:
|
||||||
|
src: "pyproject.j2"
|
||||||
|
dest: "{{ ansible_env.HOME }}/.local/lib/coc/pyproject.toml"
|
||||||
|
mode: "0644"
|
||||||
|
force: false
|
||||||
|
|
||||||
|
- name: set default venv python version
|
||||||
|
command: "poetry env use python3"
|
||||||
|
args:
|
||||||
|
chdir: "{{ ansible_env.HOME }}/.local/lib/coc"
|
||||||
|
environment:
|
||||||
|
PATH: "{{ ansible_env.HOME }}/.local/bin:{{ ansible_env.PATH }}"
|
||||||
|
when: ansible_distribution == "Debian"
|
||||||
|
|
||||||
|
- name: install default coc.nvim python packages # noqa 301
|
||||||
|
command: "poetry install"
|
||||||
|
args:
|
||||||
|
chdir: "{{ ansible_env.HOME }}/.local/lib/coc"
|
||||||
|
environment:
|
||||||
|
PATH: "{{ ansible_env.HOME }}/.local/bin:{{ ansible_env.PATH }}"
|
||||||
|
|
@ -51,60 +51,4 @@
|
||||||
name: common
|
name: common
|
||||||
tasks_from: "poetry"
|
tasks_from: "poetry"
|
||||||
|
|
||||||
- name: coc.nvim setup
|
- include_tasks: coc.yml
|
||||||
block:
|
|
||||||
- name: install coc.nvim node packages
|
|
||||||
npm:
|
|
||||||
path: "{{ xdg_data_dir }}/nvim/site/pack/default/start/coc.nvim"
|
|
||||||
state: present
|
|
||||||
global: false
|
|
||||||
- name: create default coc.nvim venv directory
|
|
||||||
file:
|
|
||||||
path: "{{ ansible_env.HOME }}/.local/lib/coc"
|
|
||||||
state: directory
|
|
||||||
mode: "0755"
|
|
||||||
- name: copy coc pyproject.toml
|
|
||||||
template:
|
|
||||||
src: "pyproject.j2"
|
|
||||||
dest: "{{ ansible_env.HOME }}/.local/lib/coc/pyproject.toml"
|
|
||||||
mode: "0644"
|
|
||||||
force: false
|
|
||||||
- name: set default venv python version
|
|
||||||
command: "poetry env use python3"
|
|
||||||
args:
|
|
||||||
chdir: "{{ ansible_env.HOME }}/.local/lib/coc"
|
|
||||||
environment:
|
|
||||||
PATH: "{{ ansible_env.HOME }}/.local/bin:{{ ansible_env.PATH }}"
|
|
||||||
when: ansible_distribution == "Debian"
|
|
||||||
- name: install default coc.nvim python packages # noqa 301
|
|
||||||
command: "poetry install"
|
|
||||||
args:
|
|
||||||
chdir: "{{ ansible_env.HOME }}/.local/lib/coc"
|
|
||||||
environment:
|
|
||||||
PATH: "{{ ansible_env.HOME }}/.local/bin:{{ ansible_env.PATH }}"
|
|
||||||
|
|
||||||
- name: systemd user setup
|
|
||||||
block:
|
|
||||||
- name: setup systemd user service folder
|
|
||||||
file:
|
|
||||||
path: "{{ xdg_config_dir }}/systemd/user"
|
|
||||||
state: directory
|
|
||||||
mode: "0755"
|
|
||||||
- name: add ssh-agent service
|
|
||||||
template:
|
|
||||||
src: "ssh-agent.j2"
|
|
||||||
dest: "{{ ansible_env.HOME }}/.config/systemd/user/ssh-agent.service"
|
|
||||||
mode: "0644"
|
|
||||||
notify: restart ssh-agent
|
|
||||||
- name: copy tmux service
|
|
||||||
template:
|
|
||||||
src: "tmux.j2"
|
|
||||||
dest: "{{ xdg_config_dir }}/systemd/user/tmux.service"
|
|
||||||
force: false
|
|
||||||
mode: "0644"
|
|
||||||
- name: copy tmux startup script
|
|
||||||
copy:
|
|
||||||
src: "tmux_start"
|
|
||||||
dest: "{{ ansible_env.HOME }}/.local/bin/tmux_start"
|
|
||||||
mode: "0740"
|
|
||||||
force: false
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
|
||||||
|
|
||||||
[Unit]
|
|
||||||
Description=SSH key agent
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
|
|
||||||
ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=default.target
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
|
||||||
|
|
||||||
[Unit]
|
|
||||||
Description=Tmux startup script
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Environment=DISPLAY=:0
|
|
||||||
ExecStart=/home/sonny/.local/bin/tmux_start
|
|
||||||
Type=forking
|
|
||||||
RemainAfterExit=yes
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=default.target
|
|
||||||
|
|
@ -7,3 +7,5 @@ packages:
|
||||||
- npm
|
- npm
|
||||||
- ctags
|
- ctags
|
||||||
- kitty
|
- kitty
|
||||||
|
- docker # TODO add tasks
|
||||||
|
- docker-compose
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue