-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1abc1d4
commit a36b051
Showing
1 changed file
with
27 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |