From 83272b36b8c6d6d9398cd0b3980cd2f057e71168 Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Thu, 16 Jan 2025 17:44:58 -0500 Subject: [PATCH] Trimming down Ansible folder. --- .../.github => .gitea}/ansible-code-bot.yml | 0 .../.github => .gitea}/workflows/tests.yml | 6 +--- ansible/.vscode/extensions.json | 3 -- ansible/.vscode/settings.json | 3 -- ansible/ansible.cfg | 8 ++--- ansible/docker_config_deploy.yml | 4 +-- ansible/inventory/host_vars/rinoa.yml | 2 -- ansible/inventory/hosts.yml | 12 ------- ansible/linux_playbook.yml | 31 ------------------- 9 files changed, 5 insertions(+), 64 deletions(-) rename {ansible/.github => .gitea}/ansible-code-bot.yml (100%) rename {ansible/.github => .gitea}/workflows/tests.yml (70%) delete mode 100644 ansible/.vscode/extensions.json delete mode 100644 ansible/.vscode/settings.json delete mode 100644 ansible/inventory/host_vars/rinoa.yml delete mode 100644 ansible/inventory/hosts.yml delete mode 100644 ansible/linux_playbook.yml diff --git a/ansible/.github/ansible-code-bot.yml b/.gitea/ansible-code-bot.yml similarity index 100% rename from ansible/.github/ansible-code-bot.yml rename to .gitea/ansible-code-bot.yml diff --git a/ansible/.github/workflows/tests.yml b/.gitea/workflows/tests.yml similarity index 70% rename from ansible/.github/workflows/tests.yml rename to .gitea/workflows/tests.yml index 4f8f08a2..79480190 100644 --- a/ansible/.github/workflows/tests.yml +++ b/.gitea/workflows/tests.yml @@ -1,9 +1,5 @@ --- -name: "CI" - -concurrency: - group: ${{ github.head_ref || github.run_id }} - cancel-in-progress: true +name: "Ansible Lint" on: # yamllint disable-line rule:truthy pull_request: 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/ansible.cfg b/ansible/ansible.cfg index f5de6d44..a30744f9 100644 --- a/ansible/ansible.cfg +++ b/ansible/ansible.cfg @@ -1,17 +1,13 @@ [defaults] # Specify the inventory file -inventory = inventory/hosts.yml - -# Define the directory for host and group variables -host_vars_inventory = inventory/host_vars -group_vars_inventory = inventory/group_vars +inventory = hosts.yml collections_path = ./collections/ansible_collections # Set the logging verbosity level verbosity = 2 # Set the default user for SSH connections -remote_user = myuser +remote_user = charish # Define the default become method become_method = sudo diff --git a/ansible/docker_config_deploy.yml b/ansible/docker_config_deploy.yml index a4ed5235..34bfc811 100644 --- a/ansible/docker_config_deploy.yml +++ b/ansible/docker_config_deploy.yml @@ -1,8 +1,8 @@ --- - name: Deploy config templates and trigger GitHub workflow - hosts: all + hosts: rinoa vars: - appdata_base_path: "~/.docker/config/appdata" + appdata_base_path: "/home/charish/.docker/config/appdata" tasks: - name: Ensure target directories exist ansible.builtin.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/inventory/hosts.yml b/ansible/inventory/hosts.yml deleted file mode 100644 index d8f9e1c4..00000000 --- a/ansible/inventory/hosts.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -all: - hosts: - benedikta: - ansible_host: 192.168.1.241 - ansible_user: charish - rikku: - ansible_host: 192.168.1.253 - ansible_user: pi - rinoa: - ansible_host: 192.168.1.254 - ansible_user: charish \ No newline at end of file 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