improved context system

This commit is contained in:
Alice
2024-10-08 20:39:22 +02:00
committed by Morten Olsen
parent c8549b6142
commit 134a64b30a
47 changed files with 264 additions and 338 deletions

View File

@@ -1,4 +0,0 @@
git clone https://github.com/morten-olsen/configs.git ~/.configs/system
cd ~/.configs/system
make install
./scripts/setup-local.sh

View File

@@ -11,11 +11,30 @@ android:
ansible_port: 8022 ansible_port: 8022
ansible_user: u0_a200 ansible_user: u0_a200
desktops: desktops:
vars:
contexts:
private:
path: ~/Projects/private
git:
email: fbtijfdq@void.black
name: Morten Olsen
signing_key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFaIAP/ZJ7+7jeR44e1yIJjfQAB6MN351LDKJAXVF62P
replacements:
- use: "ssh://git@giteaa.olsen.cloud:2202/"
instead_of: "ssh://git@gitea.olsen.cloud:2202/"
zeronorth:
path: ~/Projects/zeronorth
env:
NODE_AUTH_TOKEN: "op://jpksggxxmcuwnbwkooktr3iqcy/ut3yag6r7y4bsfrztahp7pcc6q/password"
AWS_PROFILE: "zeronorth"
git:
email: morten.olsen@zeronorth.com
name: Morten Olsen
signing_key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKDbZITpz5QrVIxPn9gKVWMPK+3W3YZZGszFOQvO/h7M
hosts: hosts:
zn-macbook: zn-macbook:
ansible_host: 192.168.3.3 # ansible_host: 192.168.3.3
ansible_connection: ssh # ansible_connection: ssh
ansible_port: 22 # ansible_port: 22
ansible_user: alice # ansible_user: alice
contexts:
- zeronorth

View File

@@ -2,7 +2,7 @@
- name: Setup host - name: Setup host
hosts: localhost hosts: localhost
vars: vars:
contexts: [] contexts: {}
roles: roles:
- role: env_terminal - role: env_terminal
- role: env_develop - role: env_develop

View File

@@ -1,9 +0,0 @@
export TMPDIR="${TMPDIR:-/tmp}"
export PATH="$PATH:$HOME/.local/bin"
alias ls=eza
alias cat=bat
alias grep=rg
alias diff=delta
alias less=bat
alias gr='if [ "`git rev-parse --show-cdup`" != "" ]; then cd `git rev-parse --show-cdup`; fi'

View File

@@ -1,3 +0,0 @@
---
dependencies:
- role: base_info

View File

@@ -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'

View File

@@ -1,34 +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
become: "{{ install_with_root }}"
ansible.builtin.package:
name: "{{ terminal_pkgs }}"
- name: "Install casks : {{ context }}"
tags:
- install
when: terminal_casks
community.general.homebrew_cask:
name: "{{ terminal_casks }}"
state: installed

View File

@@ -1,16 +0,0 @@
---
- name: Install context dependencies
ansible.builtin.include_tasks: install.yml
loop: "{{ contexts }}"
loop_control:
loop_var: context
tags:
- config
- name: Configure contexts
ansible.builtin.include_tasks: config.yml
loop: "{{ contexts }}"
loop_control:
loop_var: context
tags:
- config

View File

@@ -1,14 +0,0 @@
---
terminal_pkgs:
- bat
- eza
- direnv
- fzf
- gnupg
- jq
- ripgrep
- neovim
- gh
- tmux
- zoxide
- sshpass

View File

@@ -1,4 +0,0 @@
---
terminal_pkgs: []
terminal_casks: []
terminal_flatpaks: []

View File

@@ -1,5 +0,0 @@
---
terminal_pkgs:
- terraform
- awscli
- copier

View File

@@ -1,8 +1,13 @@
- name: Setting host facts - name: Setting generic facts
tags: always tags: always
ansible.builtin.set_fact: ansible.builtin.set_fact:
username: alice username: alice
home: "{{ ansible_env.HOME }}" home: "{{ ansible_env.HOME }}"
use_become: true use_become: true
mac_os: "{{ ansible_distribution == 'MacOSX' }}" mac_os: "{{ ansible_distribution == 'MacOSX' }}"
contexts: "{{ ['default'] + (contexts | default([])) }}"
- name: Setting macos facts
tags: always
when: mac_os
ansible.builtin.set_fact:
install_with_root: false

View File

@@ -1,3 +1,4 @@
install_with_root: true install_with_root: true
terminal_casks: [] terminal_casks: []
pkgs: [] pkgs: []
contexts: {}

View File

@@ -1,5 +1,5 @@
--- ---
- name: Copy config {{ context }} - name: Setup directories
tags: tags:
- config - config
ansible.builtin.file: ansible.builtin.file:
@@ -7,25 +7,12 @@
path: "{{ home }}/{{ item.path }}" path: "{{ home }}/{{ item.path }}"
state: directory state: directory
with_community.general.filetree: with_community.general.filetree:
- ../files/{{ context }} - ../files/
loop_control: loop_control:
label: "{{ item.path }}" label: "{{ item.path }}"
when: item.state == 'directory' when: item.state == 'directory'
- name: "Copy templates : {{ context }}" - name: Copy config
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: tags:
- config - config
ansible.builtin.copy: ansible.builtin.copy:
@@ -33,7 +20,7 @@
dest: "{{ home }}/{{ item.path }}" dest: "{{ home }}/{{ item.path }}"
mode: "{{ item.mode }}" mode: "{{ item.mode }}"
with_community.general.filetree: with_community.general.filetree:
- ../files/{{ context }} - ../files
loop_control: loop_control:
label: "{{ item.path }}" label: "{{ item.path }}"
when: item.state == 'file' when: item.state == 'file'

View File

@@ -20,7 +20,7 @@
ansible.builtin.package: ansible.builtin.package:
name: "{{ terminal_pkgs }}" name: "{{ terminal_pkgs }}"
- name: "Install casks : {{ context }}" - name: "Install casks"
tags: tags:
- install - install
when: terminal_casks when: terminal_casks

View File

@@ -1,16 +1,22 @@
--- ---
- name: Install context dependencies - name: Install dependencies
ansible.builtin.include_tasks: install.yml ansible.builtin.include_tasks: install.yml
loop: "{{ contexts }}"
loop_control:
loop_var: context
tags: tags:
- config - config
- name: Configure contexts - name: Configure
ansible.builtin.include_tasks: config.yml
loop: "{{ contexts }}"
loop_control:
loop_var: context
tags: tags:
- config - config
ansible.builtin.include_tasks: config.yml
- name: Setup contexts
tags:
- git
- config
include_tasks: "setup-context.yml"
vars:
name: "{{ item.key }}"
context: "{{ item.value }}"
loop: "{{ contexts | dict2items }}"
loop_control:
label: "{{ item.key }}"

View File

@@ -0,0 +1,12 @@
- name: Setup context env
tags:
- git
- config
ansible.builtin.template:
src: "../templates/envrc.context.j2"
dest: "{{ context.path }}/.envrc"
mode: "600"
vars:
env: "{{ context.env}}"
name: "{{ name }}"
when: "'env' in context"

View File

@@ -0,0 +1,4 @@
{% for key in env %}
export {{ key }}="{{ env[key] }}"
{% endfor %}

View File

@@ -1,6 +0,0 @@
host github-private
hostname ssh.github.com
user git
port 443
IdentityFile ~/.ssh/keys/github-private.pub
IdentitiesOnly yes

View File

@@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFaIAP/ZJ7+7jeR44e1yIJjfQAB6MN351LDKJAXVF62P

View File

@@ -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

View File

@@ -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/

View File

@@ -1,3 +0,0 @@
@morten-olsen:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}

View File

@@ -1,6 +0,0 @@
host github-zeronorth
hostname ssh.github.com
user git
port 443
IdentityFile ~/.ssh/keys/github-zeronorth.pub
IdentitiesOnly yes

View File

@@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKDbZITpz5QrVIxPn9gKVWMPK+3W3YZZGszFOQvO/h7M

View File

@@ -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"

View File

@@ -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/

View File

@@ -1,2 +0,0 @@
@0north:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}

View File

@@ -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'

View 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

View File

@@ -1,22 +1,28 @@
--- ---
- name: Install context dependencies - name: "Load vars"
ansible.builtin.include_tasks: install.yml ansible.builtin.include_vars: "{{ item }}"
loop: "{{ contexts }}"
loop_control:
loop_var: context
tags:
- config
- name: Install atuin
tags: tags:
- install - install
ansible.builtin.include_role: with_first_found:
name: software_atuin - files:
- "{{ ansible_distribution }}-{{ ansible_distribution_release }}.yml"
- "{{ ansible_distribution }}.yml"
- "{{ ansible_os_family }}.yml"
- default.yml
paths: ../vars
skip: true
- name: Configure contexts - name: "Install dependencies"
ansible.builtin.include_tasks: config.yml
loop: "{{ contexts }}"
loop_control:
loop_var: context
tags: 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

View File

@@ -1,4 +0,0 @@
---
terminal_pkgs: []
terminal_casks: []
terminal_flatpaks: []

View File

@@ -1,5 +0,0 @@
---
terminal_pkgs:
- terraform
- awscli
- copier

View File

@@ -22,9 +22,10 @@
- name: Ensure dir - name: Ensure dir
tags: always tags: always
ansible.builtin.file: ansible.builtin.file:
path: "{{ home }}/.scripts" path: "{{ home }}/.local/bin"
mode: "0755" mode: "0755"
state: directory state: directory
- name: Move bin - name: Move bin
tags: always tags: always
ansible.builtin.copy: ansible.builtin.copy:
@@ -33,6 +34,12 @@
src: "{{ software_atuin_unpack_file }}" src: "{{ software_atuin_unpack_file }}"
dest: "{{ home }}/.local/bin/atuin" dest: "{{ home }}/.local/bin/atuin"
- name: Cleanup
tags: always
ansible.builtin.file:
path: "{{ software_atuin_unpack_file }}"
state: absent
- name: Setup config dirctories - name: Setup config dirctories
tags: tags:
- config - config

View File

@@ -1 +1,2 @@
install_with_root: true install_with_root: true
contexts: {}

View File

@@ -1,3 +1,5 @@
--- ---
dependencies: dependencies:
- role: base_info - role: base_info
- role: base_terminal
- role: software_ssh

View File

@@ -1,6 +1,7 @@
--- ---
- name: Install dependencies - name: Install dependencies
tags: tags:
- git
- install - install
become: "{{ install_with_root }}" become: "{{ install_with_root }}"
ansible.builtin.package: ansible.builtin.package:
@@ -10,6 +11,7 @@
- name: Copy config - name: Copy config
tags: tags:
- git
- config - config
ansible.builtin.file: ansible.builtin.file:
mode: "{{ item.mode }}" mode: "{{ item.mode }}"
@@ -21,21 +23,9 @@
label: "{{ item.path }}" label: "{{ item.path }}"
when: item.state == 'directory' when: item.state == 'directory'
- name: "Copy templates" - name: "Copy configs"
tags:
- config
ansible.builtin.template:
src: "{{ item.src }}"
dest: "{{ home }}/{{ item.path | regex_replace('\\.j2$', '') }}"
mode: "{{ item.mode }}"
with_community.general.filetree:
- ../templates
loop_control:
label: "{{ item.path }}"
when: item.state == 'file'
- name: Copy config
tags: tags:
- git
- config - config
ansible.builtin.copy: ansible.builtin.copy:
src: "{{ item.src }}" src: "{{ item.src }}"
@@ -46,3 +36,24 @@
loop_control: loop_control:
label: "{{ item.path }}" label: "{{ item.path }}"
when: item.state == 'file' when: item.state == 'file'
- name: Setup config
tags:
- git
- config
ansible.builtin.template:
src: "../templates/gitconfig.j2"
dest: "{{ home }}/.gitconfig"
mode: "644"
- name: Setup contexts
tags:
- git
- config
include_tasks: "setup-context.yml"
vars:
name: "{{ item.key }}"
context: "{{ item.value }}"
loop: "{{ contexts | dict2items }}"
loop_control:
label: "{{ item.key }}"

View File

@@ -0,0 +1,43 @@
- name: Setup context git config
tags:
- git
- config
ansible.builtin.template:
src: "../templates/gitconfig.context.j2"
dest: "{{ context.path }}/.gitconfig"
mode: "644"
vars:
git: "{{ context.git }}"
name: "{{ name }}"
when: "'git' in context"
- name: Setup context ssh config
tags:
- git
- config
ansible.builtin.template:
src: "../templates/sshconfig.context.j2"
dest: "{{ home }}/.ssh/config.d/git-{{ name }}"
mode: "644"
vars:
name: "{{ name }}"
when: "'git' in context and 'signing_key' in context.git"
- name: Ensure dir
tags:
- git
- config
ansible.builtin.file:
path: "{{ home }}/.ssh/keys"
state: directory
mode: "0700"
- name: Setup context public key
tags:
- git
- config
ansible.builtin.copy:
content: "{{ context.git.signing_key }}"
dest: "{{ home }}/.ssh/keys/github-{{ name }}.pub"
mode: "0644"
when: "'git' in context and 'signing_key' in context.git"

View File

@@ -0,0 +1,28 @@
[user]
email = {{ git.email }}
name = {{ git.name }}
{% if 'signing_key' in git %}
signingkey = {{ git.signing_key }}
[commit]
gpgsign = true
[gpg]
format = ssh
[gpg "ssh"]
program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign"
{% endif %}
{% if 'replacements' in git %}
{% for replacement in git.replacements %}
[url "{{ replacement.use }}"]
insteadOf = "{{ replacement.instead_of }}"
{% endfor %}
{% endif %}
[url "git@github-{{name}}:"]
insteadOf = https://github.com/

View File

@@ -1,8 +1,3 @@
[gpg]
format = ssh
[gpg "ssh"]
program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign"
[alias] [alias]
graph = log --graph --color --pretty=format:"%C(yellow)%H%C(green)%d%C(reset)%n%x20%cd%n%x20%cn%C(blue)%x20(%ce)%x20%C(cyan)[gpg:%GK%x20%G?]%C(reset)%n%x20%s%n" graph = log --graph --color --pretty=format:"%C(yellow)%H%C(green)%d%C(reset)%n%x20%cd%n%x20%cn%C(blue)%x20(%ce)%x20%C(cyan)[gpg:%GK%x20%G?]%C(reset)%n%x20%s%n"
@@ -20,8 +15,6 @@
[difftool "nvimdiff"] [difftool "nvimdiff"]
cmd = "nvim -d \"$LOCAL\" \"$REMOTE\"" cmd = "nvim -d \"$LOCAL\" \"$REMOTE\""
[commit]
gpgsign = true
[url "https://"] [url "https://"]
insteadOf = git:// insteadOf = git://
@@ -43,11 +36,13 @@
process = git-lfs filter-process process = git-lfs filter-process
required = true required = true
[includeIf "gitdir:~/Projects/zeronorth/"]
path = ~/Projects/zeronorth/.gitconfig
[includeIf "gitdir:~/Projects/private/"]
path = ~/Projects/private/.gitconfig
[push] [push]
autoSetupRemote = true autoSetupRemote = true
{% for key in contexts %}
{% if 'git' in contexts[key] %}
[includeIf "gitdir:{{ contexts[key].path }}/"]
path = {{ contexts[key].path }}/.gitconfig
{% endif %}
{% endfor %}

View File

@@ -0,0 +1,6 @@
host github-{{ name }}
hostname ssh.github.com
user git
port 443
IdentityFile ~/.ssh/keys/github-{{ name }}.pub
IdentitiesOnly yes

View File

@@ -9,6 +9,7 @@
- name: Setup config dirctories - name: Setup config dirctories
tags: tags:
- nvim
- config - config
ansible.builtin.file: ansible.builtin.file:
mode: "{{ item.mode }}" mode: "{{ item.mode }}"
@@ -22,6 +23,7 @@
- name: Copy config {{ context }} - name: Copy config {{ context }}
tags: tags:
- nvim
- config - config
ansible.builtin.copy: ansible.builtin.copy:
src: "{{ item.src }}" src: "{{ item.src }}"
@@ -39,12 +41,30 @@
- nvim - nvim
ansible.builtin.git: ansible.builtin.git:
repo: https://github.com/morten-olsen/nvim repo: https://github.com/morten-olsen/nvim
dest: "{{ home }}/.config/nvim" dest: "{{ home }}/Projects/private/nvim"
accept_newhostkey: true accept_newhostkey: true
clone: true clone: true
update: true update: true
force: true force: true
- name: Ensure dir
tags:
- config
- nvim
ansible.builtin.file:
path: "{{ home }}/.config"
state: directory
mode: "0755"
- name: Setup nvim link
tags:
- config
- nvim
ansible.builtin.file:
src: "{{ home }}/Projects/private/nvim"
dest: "{{ home }}/.config/nvim"
state: link
- name: Prepare neovim - name: Prepare neovim
tags: tags:
- config - config

View File

@@ -0,0 +1,27 @@
- name: Copy config
tags:
- git
- config
ansible.builtin.file:
mode: "{{ item.mode }}"
path: "{{ home }}/{{ item.path }}"
state: directory
with_community.general.filetree:
- ../files
loop_control:
label: "{{ item.path }}"
when: item.state == 'directory'
- name: "Copy configs"
tags:
- git
- config
ansible.builtin.copy:
src: "{{ item.src }}"
dest: "{{ home }}/{{ item.path }}"
mode: "{{ item.mode }}"
with_community.general.filetree:
- ../files
loop_control:
label: "{{ item.path }}"
when: item.state == 'file'

View File

@@ -5,7 +5,7 @@
- role: env_terminal - role: env_terminal
- role: env_develop - role: env_develop
- role: server_ssh - role: server_ssh
- role: env_desktop # - role: env_desktop
- name: Setup android - name: Setup android
hosts: android hosts: android

View File

@@ -12,8 +12,8 @@ fi
echo "Setting up $MACHINE_NAME" echo "Setting up $MACHINE_NAME"
ansible-playbook -i inventory.yml playbooks/setup.yml \ ansible-playbook -i inventory.yml playbooks/setup.yml \
--extra-vars "ansible_python_interpreter=$(which python)" \ --extra-vars "ansible_python_interpreter=$(which python)" \
--connection=local \
--inventory "$MACHINE_NAME," \ --inventory "$MACHINE_NAME," \
--limit "$MACHINE_NAME" \ --limit "$MACHINE_NAME" \
$@ \ $@
--ask-become-pass

View File

@@ -11,7 +11,6 @@ fi
echo "Setting up $MACHINE_NAME" echo "Setting up $MACHINE_NAME"
ansible-playbook -i inventory.yml playbooks/setup.yml \ ansible-playbook -i inventory.yml playbooks/setup.yml \
--connection=local \
--inventory "$MACHINE_NAME," \ --inventory "$MACHINE_NAME," \
--limit "$MACHINE_NAME" \ --limit "$MACHINE_NAME" \
$@ \ $@ \