aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/roles/dotfiles
diff options
context:
space:
mode:
Diffstat (limited to 'src/roles/dotfiles')
-rw-r--r--src/roles/dotfiles/defaults/main.yml1
-rw-r--r--src/roles/dotfiles/tasks/main.yml27
2 files changed, 28 insertions, 0 deletions
diff --git a/src/roles/dotfiles/defaults/main.yml b/src/roles/dotfiles/defaults/main.yml
new file mode 100644
index 0000000..0ce4769
--- /dev/null
+++ b/src/roles/dotfiles/defaults/main.yml
@@ -0,0 +1 @@
+dotfiles_user: egor
diff --git a/src/roles/dotfiles/tasks/main.yml b/src/roles/dotfiles/tasks/main.yml
new file mode 100644
index 0000000..4230aac
--- /dev/null
+++ b/src/roles/dotfiles/tasks/main.yml
@@ -0,0 +1,27 @@
+- name: ssh-agent hack
+ ansible.posix.acl:
+ path: "{{ 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
+ ansible.builtin.git:
+ accept_hostkey: true
+ dest: "~/workspace/personal/{{ item }}"
+ repo: "git@github.com:egor-tensin/{{ item }}.git"
+ loop:
+ - linux-home
+
+ - name: Run setup.sh
+ ansible.builtin.command: ./setup.sh
+ args:
+ chdir: ~/workspace/personal/linux-home