diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-01-25 22:24:18 +0100 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-01-26 11:34:34 +0100 |
commit | d9c4c24fb45e77628f2b9bc7e73b3e6360324dce (patch) | |
tree | b5bb87a2cf844d539a4ed8f9be5e359f8a535c05 /roles/dotfiles | |
parent | move tool existence conditionals to role common (diff) | |
download | maintenance-d9c4c24fb45e77628f2b9bc7e73b3e6360324dce.tar.gz maintenance-d9c4c24fb45e77628f2b9bc7e73b3e6360324dce.zip |
add role dotfiles
Diffstat (limited to 'roles/dotfiles')
-rw-r--r-- | roles/dotfiles/defaults/main.yml | 1 | ||||
-rw-r--r-- | roles/dotfiles/tasks/main.yml | 29 |
2 files changed, 30 insertions, 0 deletions
diff --git a/roles/dotfiles/defaults/main.yml b/roles/dotfiles/defaults/main.yml new file mode 100644 index 0000000..0ce4769 --- /dev/null +++ b/roles/dotfiles/defaults/main.yml @@ -0,0 +1 @@ +dotfiles_user: egor diff --git a/roles/dotfiles/tasks/main.yml b/roles/dotfiles/tasks/main.yml new file mode 100644 index 0000000..c4b6fef --- /dev/null +++ b/roles/dotfiles/tasks/main.yml @@ -0,0 +1,29 @@ +- name: ssh-agent hack + acl: + name: "{{ item }}" + etype: user + entity: "{{ dotfiles_user }}" + permissions: rwx + state: present + loop: + - "{{ ansible_env.SSH_AUTH_SOCK | dirname }}" + - "{{ ansible_env.SSH_AUTH_SOCK }}" + +- name: Update my dotfiles + become: true + become_user: "{{ dotfiles_user }}" + block: + - name: Pull repositories + git: + accept_hostkey: true + dest: "~/workspace/personal/{{ item }}" + repo: "git@github.com:egor-tensin/{{ item }}.git" + loop: + - linux-home + - config-links + + - name: Run links-update + shell: | + ../config-links/links-update && ../config-links/links-chmod go-w + args: + chdir: ~/workspace/personal/linux-home |