mirror of
https://github.com/morten-olsen/configs.git
synced 2026-02-08 00:46:24 +01:00
improved context system
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
host github-private
|
||||
hostname ssh.github.com
|
||||
user git
|
||||
port 443
|
||||
IdentityFile ~/.ssh/keys/github-private.pub
|
||||
IdentitiesOnly yes
|
||||
@@ -1 +0,0 @@
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFaIAP/ZJ7+7jeR44e1yIJjfQAB6MN351LDKJAXVF62P
|
||||
@@ -1,4 +0,0 @@
|
||||
export NPM_GITHUB_TOKEN="op://jpksggxxmcuwnbwkooktr3iqcy/ut3yag6r7y4bsfrztahp7pcc6q/password"
|
||||
export NODE_AUTH_TOKEN=$NPM_GITHUB_TOKEN
|
||||
export GITHUB_TOKEN=$NPM_GITHUB_TOKEN
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
[user]
|
||||
email = morten@olsen.pro
|
||||
name = Morten Olsen
|
||||
signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFaIAP/ZJ7+7jeR44e1yIJjfQAB6MN351LDKJAXVF62P
|
||||
|
||||
[url "git@github-private:morten-olsen/"]
|
||||
insteadOf = https://github.com/morten-olsen/
|
||||
|
||||
[url "ssh://git@giteaa.olsen.cloud:2202/"]
|
||||
insteadOf = ssh://git@gitea.olsen.cloud:2202/
|
||||
@@ -1,3 +0,0 @@
|
||||
@morten-olsen:registry=https://npm.pkg.github.com
|
||||
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
host github-zeronorth
|
||||
hostname ssh.github.com
|
||||
user git
|
||||
port 443
|
||||
IdentityFile ~/.ssh/keys/github-zeronorth.pub
|
||||
IdentitiesOnly yes
|
||||
@@ -1 +0,0 @@
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKDbZITpz5QrVIxPn9gKVWMPK+3W3YZZGszFOQvO/h7M
|
||||
@@ -1,4 +0,0 @@
|
||||
export NPM_GITHUB_TOKEN="op://jpksggxxmcuwnbwkooktr3iqcy/ut3yag6r7y4bsfrztahp7pcc6q/password"
|
||||
export NODE_AUTH_TOKEN=$NPM_GITHUB_TOKEN
|
||||
export GITHUB_TOKEN="op://Employee/lobazchngpvla4opw4rwzjwnoi/credential"
|
||||
export AWS_PROFILE="zeronorth"
|
||||
@@ -1,7 +0,0 @@
|
||||
[user]
|
||||
email = morten.olsen@zeronorth.com
|
||||
name = Morten Olsen
|
||||
signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKDbZITpz5QrVIxPn9gKVWMPK+3W3YZZGszFOQvO/h7M
|
||||
|
||||
[url "git@github-zeronorth:"]
|
||||
insteadOf = https://github.com/
|
||||
@@ -1,2 +0,0 @@
|
||||
@0north:registry=https://npm.pkg.github.com
|
||||
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}
|
||||
@@ -1,39 +0,0 @@
|
||||
---
|
||||
- name: Copy config {{ context }}
|
||||
tags:
|
||||
- config
|
||||
ansible.builtin.file:
|
||||
mode: "{{ item.mode }}"
|
||||
path: "{{ home }}/{{ item.path }}"
|
||||
state: directory
|
||||
with_community.general.filetree:
|
||||
- ../files/{{ context }}
|
||||
loop_control:
|
||||
label: "{{ item.path }}"
|
||||
when: item.state == 'directory'
|
||||
|
||||
- name: "Copy templates : {{ context }}"
|
||||
tags:
|
||||
- config
|
||||
ansible.builtin.template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ home }}/{{ item.path | regex_replace('\\.j2$', '') }}"
|
||||
mode: "{{ item.mode }}"
|
||||
with_community.general.filetree:
|
||||
- ../templates/{{ context }}
|
||||
loop_control:
|
||||
label: "{{ item.path }}"
|
||||
when: item.state == 'file'
|
||||
|
||||
- name: Copy config {{ context }}
|
||||
tags:
|
||||
- config
|
||||
ansible.builtin.copy:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ home }}/{{ item.path }}"
|
||||
mode: "{{ item.mode }}"
|
||||
with_community.general.filetree:
|
||||
- ../files/{{ context }}
|
||||
loop_control:
|
||||
label: "{{ item.path }}"
|
||||
when: item.state == 'file'
|
||||
@@ -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: terminal_pkgs
|
||||
ansible.builtin.package:
|
||||
name: "{{ terminal_pkgs }}"
|
||||
|
||||
- name: "Install casks : {{ context }}"
|
||||
tags:
|
||||
- install
|
||||
when: terminal_casks
|
||||
community.general.homebrew_cask:
|
||||
name: "{{ terminal_casks }}"
|
||||
state: installed
|
||||
@@ -1,22 +1,28 @@
|
||||
---
|
||||
- name: Install context dependencies
|
||||
ansible.builtin.include_tasks: install.yml
|
||||
loop: "{{ contexts }}"
|
||||
loop_control:
|
||||
loop_var: context
|
||||
tags:
|
||||
- config
|
||||
|
||||
- name: Install atuin
|
||||
- name: "Load vars"
|
||||
ansible.builtin.include_vars: "{{ item }}"
|
||||
tags:
|
||||
- install
|
||||
ansible.builtin.include_role:
|
||||
name: software_atuin
|
||||
with_first_found:
|
||||
- files:
|
||||
- "{{ ansible_distribution }}-{{ ansible_distribution_release }}.yml"
|
||||
- "{{ ansible_distribution }}.yml"
|
||||
- "{{ ansible_os_family }}.yml"
|
||||
- default.yml
|
||||
paths: ../vars
|
||||
skip: true
|
||||
|
||||
- name: Configure contexts
|
||||
ansible.builtin.include_tasks: config.yml
|
||||
loop: "{{ contexts }}"
|
||||
loop_control:
|
||||
loop_var: context
|
||||
- name: "Install dependencies"
|
||||
tags:
|
||||
- config
|
||||
- install
|
||||
when: terminal_pkgs
|
||||
ansible.builtin.package:
|
||||
name: "{{ terminal_pkgs }}"
|
||||
|
||||
- name: "Install casks"
|
||||
tags:
|
||||
- install
|
||||
when: terminal_casks
|
||||
community.general.homebrew_cask:
|
||||
name: "{{ terminal_casks }}"
|
||||
state: installed
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
---
|
||||
terminal_pkgs: []
|
||||
terminal_casks: []
|
||||
terminal_flatpaks: []
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
terminal_pkgs:
|
||||
- terraform
|
||||
- awscli
|
||||
- copier
|
||||
Reference in New Issue
Block a user