First draft for ATON role (WIP)

This commit is contained in:
2026-03-02 12:02:34 +01:00
parent 9893a4fdd1
commit 57020528c6
5 changed files with 86 additions and 0 deletions

View File

@@ -0,0 +1 @@
aton_repo_url: "https://github.com/phoenixbf/aton.git"

41
roles/aton/tasks/main.yml Normal file
View File

@@ -0,0 +1,41 @@
---
- name: Ensure git is installed
ansible.builtin.package:
name:
- git
state: present
update_cache: yes
when: ansible_os_family == 'Debian'
- name: Create ATON app user
ansible.builtin.user:
name: aton
shell: /usr/sbin/nologin
home: /opt/aton-user
create_home: true
password: '*'
- name: Ensure ATON directory exists
ansible.builtin.file:
path: /opt/aton-user/aton
state: directory
owner: aton
group: aton
mode: "0755"
- name: Clone ATON repo
ansible.builtin.git:
repo: "{{ aton_repo_url }}"
dest: /opt/aton-user/aton
clone: true
become: true
become_user: aton
- name: Install NPM dependencies
community.general.npm:
ci: true
path: /opt/aton-user/aton
state: present
become: true
become_user: aton