diff --git a/.gitea/ansible-code-bot.yml b/.gitea/ansible-code-bot.yml deleted file mode 100644 index dd75c087..00000000 --- a/.gitea/ansible-code-bot.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -schedule: - interval: "daily" diff --git a/.gitea/workflows/pr-cloudflare-docker-deploy.yml b/.gitea/workflows/pr-cloudflare-docker-deploy.yml index 82defa3d..bc5c3679 100644 --- a/.gitea/workflows/pr-cloudflare-docker-deploy.yml +++ b/.gitea/workflows/pr-cloudflare-docker-deploy.yml @@ -214,9 +214,20 @@ jobs: with: ref: main + - name: Install Ansible + uses: alex-oleshkevich/setup-ansible@v1.0.1 + with: + version: "2.18.1" + - name: Install Vault uses: cpanato/vault-installer@main + - name: Run Ansible Playbook for Docker Service Configs + uses: actions-ansible@v2 + with: + playbook: ./ansible/docker_config_deploy.yml + inventory: ./ansible/ansible-inventory + - name: Generate .env file for deployment run: | vault kv get -format=json rinoa-docker/env | jq -r '.data.data' | jq -r 'keys[] as $k | "\($k)='\''\(.[$k])'\''"' > .env diff --git a/ansible/.github/ansible-code-bot.yml b/ansible/.github/ansible-code-bot.yml deleted file mode 100644 index dd75c087..00000000 --- a/ansible/.github/ansible-code-bot.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -schedule: - interval: "daily" diff --git a/ansible/.github/workflows/tests.yml b/ansible/.github/workflows/tests.yml deleted file mode 100644 index 4f8f08a2..00000000 --- a/ansible/.github/workflows/tests.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: "CI" - -concurrency: - group: ${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -on: # yamllint disable-line rule:truthy - pull_request: - branches: [main] - workflow_dispatch: - schedule: - - cron: '0 0 * * *' - -jobs: - ansible-lint: - uses: ansible/ansible-content-actions/.github/workflows/ansible_lint.yaml@main diff --git a/ansible/.vscode/extensions.json b/ansible/.vscode/extensions.json deleted file mode 100644 index c1b89785..00000000 --- a/ansible/.vscode/extensions.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "recommendations": ["redhat.ansible", "redhat.vscode-redhat-account"] -} diff --git a/ansible/.vscode/settings.json b/ansible/.vscode/settings.json deleted file mode 100644 index d38a8713..00000000 --- a/ansible/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "ansible.python.interpreterPath": "/home/charish/rinoa-docker/ansible/.venv/bin/python" -} \ No newline at end of file diff --git a/ansible/inventory/host_vars/rinoa.yml b/ansible/inventory/host_vars/rinoa.yml deleted file mode 100644 index 48843968..00000000 --- a/ansible/inventory/host_vars/rinoa.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -server_name: webserver2 diff --git a/ansible/linux_playbook.yml b/ansible/linux_playbook.yml deleted file mode 100644 index 05630c1d..00000000 --- a/ansible/linux_playbook.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -- name: Update web servers - hosts: webservers - become: true - - tasks: - - name: Ensure apache is at the present version - ansible.builtin.dnf: - name: httpd - state: present - - - name: Write the apache config file - ansible.builtin.template: - src: /srv/httpd.j2 - dest: /etc/httpd.conf - mode: "0644" - -- name: Update db servers - hosts: databases - become: true - - tasks: - - name: Ensure postgresql is at the present version - ansible.builtin.dnf: - name: postgresql - state: present - - - name: Ensure that postgresql is started - ansible.builtin.service: - name: postgresql - state: started