From a36b051a75358a370cc4b7ef1ba1982fbe12e402 Mon Sep 17 00:00:00 2001 From: Sem van Nieuwenhuizen Date: Mon, 16 Dec 2024 20:29:17 +0100 Subject: [PATCH] =?UTF-8?q?chore:=20satisfy=20linter=20=F0=9F=A4=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ansible/roles/aocaas/tasks/main.yml | 53 +++++++++++++++-------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/ansible/roles/aocaas/tasks/main.yml b/ansible/roles/aocaas/tasks/main.yml index 22e95149..5fb0906e 100644 --- a/ansible/roles/aocaas/tasks/main.yml +++ b/ansible/roles/aocaas/tasks/main.yml @@ -1,42 +1,43 @@ -- name: Create user for AoCaaS +--- +- name: "Create user for AoCaaS" ansible.builtin.user: - name: aosaas - home: /var/www/aocaas - shell: /usr/sbin/nologin + name: "aosaas" + home: "/var/www/aocaas" + shell: "/usr/sbin/nologin" system: true - state: present + state: "present" -- name: Download and extract the AoCaaS binary +- name: "Download and extract the AoCaaS binary" ansible.builtin.get_url: # Fix this later - url: https://github.com/svsticky/AoCaaS/actions/runs/12240600267/artifacts/2295080056 - dest: /var/www/aocaas/bin/artifact.zip - owner: aocaas - group: aocaas + url: "https://github.com/svsticky/AoCaaS/actions/runs/12240600267/artifacts/2295080056" + dest: "/var/www/aocaas/bin/artifact.zip" + owner: "aocaas" + group: "aocaas" mode: '775' - notify: restart aocaas + notify: "restart aocaas" -- name: Extract the AoCaaS binary +- name: "Extract the AoCaaS binary" ansible.builtin.unarchive: - src: /var/www/aocaas/bin/artifact.zip - dest: /var/www/aocaas/ - notify: restart aocaas + src: "/var/www/aocaas/bin/artifact.zip" + dest: "/var/www/aocaas/" + notify: "restart aocaas" -- name: Copy nginx configuration +- name: "Copy nginx configuration" ansible.builtin.template: - src: aocaas.conf.j2 - dest: /etc/nginx/sites-enabled/aocaas.{{ canonical_hostname }}.conf - notify: reload nginx + src: "aocaas.conf.j2" + dest: "/etc/nginx/sites-enabled/aocaas.{{ canonical_hostname }}.conf" + notify: "reload nginx" -- name: Template systemd service file +- name: "Template systemd service file" ansible.builtin.template: - src: aocaas.service.j2 - dest: /etc/systemd/system/aocaas.service - notify: restart aocaas + src: "aocaas.service.j2" + dest: "/etc/systemd/system/aocaas.service" + notify: "restart aocaas" -- name: Run `aocaas` service +- name: "Run `aocaas` service" ansible.builtin.systemd: - unit: aocaas.service - state: started + unit: "aocaas.service" + state: "started" enabled: true daemon-reload: true