mirror of
https://github.com/morten-olsen/configs.git
synced 2026-02-08 00:46:24 +01:00
run as user fixes
This commit is contained in:
@@ -1,29 +1,18 @@
|
||||
- name: Copy config
|
||||
---
|
||||
- name: Ensure dir
|
||||
tags:
|
||||
- git
|
||||
- config
|
||||
ansible.builtin.file:
|
||||
mode: "{{ item.mode }}"
|
||||
path: "{{ home }}/{{ item.path }}"
|
||||
path: "{{ home }}/.ssh"
|
||||
mode: "0700"
|
||||
owner: "{{ username }}"
|
||||
state: directory
|
||||
with_community.general.filetree:
|
||||
- ../files
|
||||
loop_control:
|
||||
label: "{{ item.path }}"
|
||||
when: item.state == 'directory'
|
||||
|
||||
- name: "Copy configs"
|
||||
- name: Setup config
|
||||
tags:
|
||||
- git
|
||||
- config
|
||||
ansible.builtin.copy:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ home }}/{{ item.path }}"
|
||||
mode: "{{ item.mode }}"
|
||||
ansible.builtin.template:
|
||||
src: "../templates/config.j2"
|
||||
dest: "{{ home }}/.ssh/config"
|
||||
owner: "{{ username }}"
|
||||
with_community.general.filetree:
|
||||
- ../files
|
||||
loop_control:
|
||||
label: "{{ item.path }}"
|
||||
when: item.state == 'file'
|
||||
mode: "644"
|
||||
|
||||
@@ -5,6 +5,10 @@ Include ~/.ssh/config.d/*
|
||||
Host *
|
||||
Controlmaster auto
|
||||
Controlpath /tmp/ssh-%r@%h:%p
|
||||
{% if mac_os %}
|
||||
IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
|
||||
{% else %}
|
||||
IdentityAgent ~/.1password/agent.sock
|
||||
{% endif %}
|
||||
ForwardAgent yes
|
||||
|
||||
Reference in New Issue
Block a user