From d9c4c24fb45e77628f2b9bc7e73b3e6360324dce Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 25 Jan 2023 22:24:18 +0100 Subject: add role dotfiles --- roles/dotfiles/tasks/main.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 roles/dotfiles/tasks/main.yml (limited to 'roles/dotfiles/tasks') 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 -- cgit v1.2.3