From bb954458ce7d50920a0b257153f210bb23f68ee1 Mon Sep 17 00:00:00 2001 From: Hayato Mizushima Date: Fri, 3 Jan 2025 17:30:39 +0900 Subject: [PATCH] feat: split setup and playbook script (#34) * feat: split script Signed-off-by: Hayato Mizushima * chore: add path Signed-off-by: Hayato Mizushima * chore: update template Signed-off-by: Hayato Mizushima * fix: last comma Signed-off-by: Hayato Mizushima --------- Signed-off-by: Hayato Mizushima --- .cspell.json | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 2 -- ansible-play.sh | 11 +++++++++++ setup-mac.sh | 3 --- setup-ubuntu.sh | 8 -------- 5 files changed, 12 insertions(+), 14 deletions(-) create mode 100755 ansible-play.sh diff --git a/.cspell.json b/.cspell.json index c3d2740..3db433d 100644 --- a/.cspell.json +++ b/.cspell.json @@ -72,6 +72,6 @@ "wslg", "XMODIFIERS", "xset", - "zstd", + "zstd" ] } diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 72a2d2e..a47fee4 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -8,6 +8,4 @@ ## How to review this PR -All required checks by github actions have been passed. - ## Others diff --git a/ansible-play.sh b/ansible-play.sh new file mode 100755 index 0000000..d7e826a --- /dev/null +++ b/ansible-play.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +export PATH="$HOME/.local/bin" + +# export .env +set -o allexport +# shellcheck disable=SC1091 +source "$(dirname "$0")/.env" +set +o allexport + +ansible-playbook ansible/ubuntu.yml --ask-become-pass diff --git a/setup-mac.sh b/setup-mac.sh index 0c66bbc..6c49e4f 100755 --- a/setup-mac.sh +++ b/setup-mac.sh @@ -12,6 +12,3 @@ if ! (command -v ansible-playbook >/dev/null 2>&1); then uv tool install ansible-core ansible-galaxy collection install community.general fi - -ENV_JSON=env.json -ansible-playbook ansible/ubuntu.yml --ask-become-pass -e @${ENV_JSON} diff --git a/setup-ubuntu.sh b/setup-ubuntu.sh index daa5b81..110dbf3 100755 --- a/setup-ubuntu.sh +++ b/setup-ubuntu.sh @@ -12,11 +12,3 @@ if ! (command -v ansible-playbook >/dev/null 2>&1); then uv tool install ansible-core ansible-galaxy collection install community.general fi - -# export .env -set -o allexport -# shellcheck disable=SC1091 -source "$(dirname $0)/.env" -set +o allexport - -ansible-playbook ansible/ubuntu.yml --ask-become-pass