Skip to content

Commit 0475ebf

Browse files
committed
Refactoring, SSH key install, Zsh install
1 parent afe9124 commit 0475ebf

File tree

7 files changed

+709
-4
lines changed

7 files changed

+709
-4
lines changed

installer.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
dnf:
66
update_cache: true
77
gather_facts: yes
8-
vars:
9-
nix_packages:
10-
- nodejs
118
tasks:
9+
- include_tasks: ./tasks/ssh.yml
1210
- include_tasks: ./tasks/zsh.yml
1311
- include_tasks: ./tasks/nix.yml

tasks/ssh.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
- name: Copy ssh key to local machine
2+
hosts: localhost
3+
connection: local
4+
vars_prompt:
5+
- name: "vault_password"
6+
prompt: "Enter vault password"
7+
private: yes
8+
tasks:
9+
- name: Decrypt ssh.yml file
10+
ansible.builtin.command: ansible-vault decrypt ssh.yml --output=ssh_private_key
11+
vars:
12+
ansible_become_pass: "{{ vault_password }}"
13+
no_log: true
14+
15+
- name: Copy ssh key to local machine
16+
ansible.builtin.copy:
17+
src: "{{ playbook_dir }}/ssh_private_key"
18+
dest: "~/.ssh/id_rsa"
19+
mode: '0600'
20+
delegate_to: localhost
21+

tasks/zsh.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@
1818
- zsh
1919
- name: Install Zshrc
2020
copy:
21-
src: ../zshrc-config
21+
src: ./zsh/zshrc-config
2222
dest: ~/.zshrc
2323
replace: yes
24+
tags:
25+
- zsh
26+
- name: Install Zshenv
27+
copy:
28+
src: ./zsh/zshenv
29+
dest: ~/.zshenv
30+
replace: yes
31+
tags:
32+
- zsh

tasks/zsh/zshenv

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export PATH=/home/soap/.local/bin:$PATH
2+
export PATH=/usr/bin/nvim

0 commit comments

Comments
 (0)