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,6 +1,14 @@
|
||||
- name: Ensure dir
|
||||
tags:
|
||||
- config
|
||||
ansible.builtin.file:
|
||||
path: "{{ context.path }}"
|
||||
state: directory
|
||||
owner: "{{ username }}"
|
||||
mode: "700"
|
||||
|
||||
- name: Setup context env
|
||||
tags:
|
||||
- git
|
||||
- config
|
||||
ansible.builtin.template:
|
||||
src: "../templates/envrc.context.j2"
|
||||
|
||||
1
playbooks/roles/env_develop/defaults/main.yml
Normal file
1
playbooks/roles/env_develop/defaults/main.yml
Normal file
@@ -0,0 +1 @@
|
||||
install_with_root: true
|
||||
@@ -1,33 +0,0 @@
|
||||
---
|
||||
- name: "Unload vars : {{ context }}"
|
||||
ansible.builtin.include_vars: ../vars/empty.yml
|
||||
tags:
|
||||
- install
|
||||
|
||||
- name: "Load vars : {{ context }}"
|
||||
ansible.builtin.include_vars: "{{ item }}"
|
||||
tags:
|
||||
- install
|
||||
with_first_found:
|
||||
- files:
|
||||
- "{{ ansible_distribution }}-{{ ansible_distribution_release }}.yml"
|
||||
- "{{ ansible_distribution }}.yml"
|
||||
- "{{ ansible_os_family }}.yml"
|
||||
- default.yml
|
||||
paths: ../vars/{{ context }}
|
||||
skip: true
|
||||
|
||||
- name: "Install dependencies : {{ context }}"
|
||||
tags:
|
||||
- install
|
||||
when: desktop_pkgs
|
||||
ansible.builtin.package:
|
||||
name: "{{ dev_pkgs }}"
|
||||
|
||||
- name: "Install casks : {{ context }}"
|
||||
tags:
|
||||
- install
|
||||
when: dev_casks
|
||||
community.general.homebrew_cask:
|
||||
name: "{{ dev_casks }}"
|
||||
state: installed
|
||||
@@ -15,6 +15,7 @@
|
||||
- name: "Install dependencies"
|
||||
tags:
|
||||
- install
|
||||
become: "{{ install_with_root }}"
|
||||
when: env_develop_pkgs
|
||||
ansible.builtin.package:
|
||||
name: "{{ env_develop_pkgs }}"
|
||||
|
||||
1
playbooks/roles/env_terminal/defaults/main.yml
Normal file
1
playbooks/roles/env_terminal/defaults/main.yml
Normal file
@@ -0,0 +1 @@
|
||||
install_with_root: true
|
||||
@@ -13,6 +13,7 @@
|
||||
skip: true
|
||||
|
||||
- name: "Install dependencies"
|
||||
become: "{{ install_with_root }}"
|
||||
tags:
|
||||
- install
|
||||
when: terminal_pkgs
|
||||
|
||||
@@ -11,7 +11,12 @@
|
||||
format = ssh
|
||||
|
||||
[gpg "ssh"]
|
||||
{% if mac_os %}
|
||||
program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign"
|
||||
{% else %}
|
||||
program = "/opt/1Password/op-ssh-sign"
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if 'replacements' in git %}
|
||||
|
||||
1
playbooks/roles/software_nvim/defaults/main.yml
Normal file
1
playbooks/roles/software_nvim/defaults/main.yml
Normal file
@@ -0,0 +1 @@
|
||||
install_with_root: true
|
||||
@@ -2,6 +2,7 @@
|
||||
- name: Install dependencies
|
||||
tags:
|
||||
- install
|
||||
become: "{{ install_with_root }}"
|
||||
ansible.builtin.package:
|
||||
name:
|
||||
- neovim
|
||||
|
||||
1
playbooks/roles/software_nvm/defaults/main.yml
Normal file
1
playbooks/roles/software_nvm/defaults/main.yml
Normal file
@@ -0,0 +1 @@
|
||||
install_with_root: true
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
- name: Install dependencies
|
||||
become: "{{ install_with_root }}"
|
||||
ansible.builtin.package:
|
||||
name:
|
||||
- git
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
set -g mouse on
|
||||
set -g default-terminal "screen-256color-bce"
|
||||
#set -g default-terminal "screen-256color-bce"
|
||||
#set -g status-justify centre
|
||||
|
||||
#set -ga terminal-overrides ',xterm-256color:Tc'
|
||||
|
||||
1
playbooks/roles/software_zsh/defaults/main.yml
Normal file
1
playbooks/roles/software_zsh/defaults/main.yml
Normal file
@@ -0,0 +1 @@
|
||||
install_with_root: true
|
||||
@@ -2,6 +2,7 @@
|
||||
- name: Install core dependencies
|
||||
tags:
|
||||
- install
|
||||
become: "{{ install_with_root }}"
|
||||
ansible.builtin.package:
|
||||
name:
|
||||
- zsh
|
||||
|
||||
Reference in New Issue
Block a user