From d99cf255b96c296ad019f218367a449c2b6f1ec0 Mon Sep 17 00:00:00 2001 From: Lucas Conrad Date: Wed, 3 Jun 2026 16:53:59 +0200 Subject: [PATCH] first commit --- .gitea/workflows/deploy.yml | 28 ++++++++++++++++++++++++++++ ansible.cfg | 0 inventory.ini | 2 ++ roles/common/tasks/main.yml | 0 roles/common/vars/main.yml | 0 site.yml | 12 ++++++++++++ 6 files changed, 42 insertions(+) create mode 100644 .gitea/workflows/deploy.yml create mode 100644 ansible.cfg create mode 100644 inventory.ini create mode 100644 roles/common/tasks/main.yml create mode 100644 roles/common/vars/main.yml create mode 100644 site.yml diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..e76ec56 --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,28 @@ +name: Production GitOps Engine +on: + push: + branches: + - main + +jobs: + execute-ansible: + runs-on: ubuntu-latest + steps: + - name: Code Extraction + uses: actions/checkout@v3 + + - name: Initialize SSH Control Pipeline + run: | + mkdir -p ~/.ssh + echo "${{ secrets.MINIPC_SSH_KEY }}" > ~/.ssh/id_ed25519 + chmod 600 ~/.ssh/id_ed25519 + # Scan host signature to block manual interactive prompts + ssh-keyscan -H 10.0.10.68 >> ~/.ssh/known_hosts + + - name: Bootstrap Ansible Runtime + run: | + apt-get update && apt-get install -y ansible + + - name: Run Orchestration Playbook + run: | + ansible-playbook -i inventory.ini site.yml \ No newline at end of file diff --git a/ansible.cfg b/ansible.cfg new file mode 100644 index 0000000..e69de29 diff --git a/inventory.ini b/inventory.ini new file mode 100644 index 0000000..ddd5519 --- /dev/null +++ b/inventory.ini @@ -0,0 +1,2 @@ +[minipc] +10.0.10.68 ansible_user=your_host_os_username \ No newline at end of file diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml new file mode 100644 index 0000000..e69de29 diff --git a/roles/common/vars/main.yml b/roles/common/vars/main.yml new file mode 100644 index 0000000..e69de29 diff --git a/site.yml b/site.yml new file mode 100644 index 0000000..7d54283 --- /dev/null +++ b/site.yml @@ -0,0 +1,12 @@ +--- +- name: Local Loopback Deployment Operations + hosts: minipc + gather_facts: false + tasks: + - name: Audit Target Operational State + ansible.builtin.command: uname -a + register: host_kernel + + - name: Log Target Status + ansible.builtin.debug: + msg: "Deployment target operating system identified as: {{ host_kernel.stdout }}" \ No newline at end of file