From fce518ab2168245dce51a7ba3a7ff93e15ad38d6 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Sat, 13 May 2023 02:35:17 +0200 Subject: [PATCH] feat: add shuttle --- .gitignore | 1 + actions/ansible.go | 20 ++++++++++++++++++++ actions/go.mod | 3 +++ roles/repos/renovate/tasks/main.yml | 1 - shuttle.yaml | 3 +++ 5 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 actions/ansible.go create mode 100644 actions/go.mod create mode 100644 shuttle.yaml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0fdad12 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.shuttle/ diff --git a/actions/ansible.go b/actions/ansible.go new file mode 100644 index 0000000..7870b47 --- /dev/null +++ b/actions/ansible.go @@ -0,0 +1,20 @@ +package main + +import ( + "context" + "log" + "os" + "os/exec" +) + +func Ansible(ctx context.Context) error { + log.Printf("running ansible playbook\n") + + cmd := exec.Command("ansible-playbook", "site.yml") + + cmd.Stdout = os.Stdout + cmd.Stdin = os.Stdin + cmd.Stderr = os.Stderr + + return cmd.Run() +} diff --git a/actions/go.mod b/actions/go.mod new file mode 100644 index 0000000..35201f7 --- /dev/null +++ b/actions/go.mod @@ -0,0 +1,3 @@ +module actions + +go 1.20 diff --git a/roles/repos/renovate/tasks/main.yml b/roles/repos/renovate/tasks/main.yml index 15c3019..f4a0141 100644 --- a/roles/repos/renovate/tasks/main.yml +++ b/roles/repos/renovate/tasks/main.yml @@ -1,4 +1,3 @@ - - name: Clone private Git repository git: repo: https://git:{{ git_token }}@git.front.kjuulh.io/kjuulh/renovate.git diff --git a/shuttle.yaml b/shuttle.yaml new file mode 100644 index 0000000..b3eabe6 --- /dev/null +++ b/shuttle.yaml @@ -0,0 +1,3 @@ +plan: false +vars: + service: clank-manage