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
|
- name: Setup context env
|
||||||
tags:
|
tags:
|
||||||
- git
|
|
||||||
- config
|
- config
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "../templates/envrc.context.j2"
|
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"
|
- name: "Install dependencies"
|
||||||
tags:
|
tags:
|
||||||
- install
|
- install
|
||||||
|
become: "{{ install_with_root }}"
|
||||||
when: env_develop_pkgs
|
when: env_develop_pkgs
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: "{{ env_develop_pkgs }}"
|
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
|
skip: true
|
||||||
|
|
||||||
- name: "Install dependencies"
|
- name: "Install dependencies"
|
||||||
|
become: "{{ install_with_root }}"
|
||||||
tags:
|
tags:
|
||||||
- install
|
- install
|
||||||
when: terminal_pkgs
|
when: terminal_pkgs
|
||||||
|
|||||||
@@ -11,7 +11,12 @@
|
|||||||
format = ssh
|
format = ssh
|
||||||
|
|
||||||
[gpg "ssh"]
|
[gpg "ssh"]
|
||||||
|
{% if mac_os %}
|
||||||
program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign"
|
program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign"
|
||||||
|
{% else %}
|
||||||
|
program = "/opt/1Password/op-ssh-sign"
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if 'replacements' in git %}
|
{% 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
|
- name: Install dependencies
|
||||||
tags:
|
tags:
|
||||||
- install
|
- install
|
||||||
|
become: "{{ install_with_root }}"
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name:
|
name:
|
||||||
- neovim
|
- 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
|
- name: Install dependencies
|
||||||
|
become: "{{ install_with_root }}"
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name:
|
name:
|
||||||
- git
|
- git
|
||||||
|
|||||||
@@ -1,29 +1,18 @@
|
|||||||
- name: Copy config
|
---
|
||||||
|
- name: Ensure dir
|
||||||
tags:
|
tags:
|
||||||
- git
|
|
||||||
- config
|
- config
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
mode: "{{ item.mode }}"
|
path: "{{ home }}/.ssh"
|
||||||
path: "{{ home }}/{{ item.path }}"
|
mode: "0700"
|
||||||
owner: "{{ username }}"
|
owner: "{{ username }}"
|
||||||
state: directory
|
state: directory
|
||||||
with_community.general.filetree:
|
|
||||||
- ../files
|
|
||||||
loop_control:
|
|
||||||
label: "{{ item.path }}"
|
|
||||||
when: item.state == 'directory'
|
|
||||||
|
|
||||||
- name: "Copy configs"
|
- name: Setup config
|
||||||
tags:
|
tags:
|
||||||
- git
|
|
||||||
- config
|
- config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.template:
|
||||||
src: "{{ item.src }}"
|
src: "../templates/config.j2"
|
||||||
dest: "{{ home }}/{{ item.path }}"
|
dest: "{{ home }}/.ssh/config"
|
||||||
mode: "{{ item.mode }}"
|
|
||||||
owner: "{{ username }}"
|
owner: "{{ username }}"
|
||||||
with_community.general.filetree:
|
mode: "644"
|
||||||
- ../files
|
|
||||||
loop_control:
|
|
||||||
label: "{{ item.path }}"
|
|
||||||
when: item.state == 'file'
|
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ Include ~/.ssh/config.d/*
|
|||||||
Host *
|
Host *
|
||||||
Controlmaster auto
|
Controlmaster auto
|
||||||
Controlpath /tmp/ssh-%r@%h:%p
|
Controlpath /tmp/ssh-%r@%h:%p
|
||||||
|
{% if mac_os %}
|
||||||
IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
|
IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
|
||||||
|
{% else %}
|
||||||
|
IdentityAgent ~/.1password/agent.sock
|
||||||
|
{% endif %}
|
||||||
ForwardAgent yes
|
ForwardAgent yes
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
set -g mouse on
|
set -g mouse on
|
||||||
set -g default-terminal "screen-256color-bce"
|
#set -g default-terminal "screen-256color-bce"
|
||||||
#set -g status-justify centre
|
#set -g status-justify centre
|
||||||
|
|
||||||
#set -ga terminal-overrides ',xterm-256color:Tc'
|
#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
|
- name: Install core dependencies
|
||||||
tags:
|
tags:
|
||||||
- install
|
- install
|
||||||
|
become: "{{ install_with_root }}"
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name:
|
name:
|
||||||
- zsh
|
- zsh
|
||||||
|
|||||||
Reference in New Issue
Block a user