diff --git a/ansible/Dockerfile b/ansible/Dockerfile index d7e61f93..44467a34 100644 --- a/ansible/Dockerfile +++ b/ansible/Dockerfile @@ -4,6 +4,7 @@ ARG JAVA_VERSION=21 RUN apt-get update && apt-get install --no-install-recommends -y \ bash \ + vim \ git \ curl \ unzip \ diff --git a/ansible/playbooks/saas/main.yml b/ansible/playbooks/saas/main.yml index 07729907..ea194516 100644 --- a/ansible/playbooks/saas/main.yml +++ b/ansible/playbooks/saas/main.yml @@ -27,7 +27,7 @@ - name: Get software variables ansible.builtin.set_fact: - software: "{{ lookup('simple-stack-ui', type='software', key=domain, subkey='', missing='warn') }}" + software: "{{ lookup('simple-stack-ui', type='software', key=domain, subkey='', missing='warn') | from_json }}" - name: Debug software ansible.builtin.debug: diff --git a/ansible/playbooks/saas/roles/simplestack_ansible/templates/nomad.hcl b/ansible/playbooks/saas/roles/simplestack_ansible/templates/nomad.hcl index d0f81d66..113dc13f 100644 --- a/ansible/playbooks/saas/roles/simplestack_ansible/templates/nomad.hcl +++ b/ansible/playbooks/saas/roles/simplestack_ansible/templates/nomad.hcl @@ -42,11 +42,15 @@ job "{{ domain }}" { SIMPLE_STACK_UI_USER = "{{ lookup('simple-stack-ui', type='secret', key=domain, subkey='user', missing='error') }}" SIMPLE_STACK_UI_PASSWORD = "{{ lookup('simple-stack-ui', type='secret', key=domain, subkey='password', missing='error') }}" SIMPLE_STACK_UI_URL = "{{ lookup('simple-stack-ui', type='secret', key=domain, subkey='url', missing='error') }}" + GITHUB_API_TOKEN = "{{ lookup('simple-stack-ui', type='secret', key=domain, subkey='github_api_token', missing='error') }}" } config { image = "ghcr.io/wiseflat/simple-stack-ansible:v{{ softwares.simplestack_ui.version }}" ports = ["http"] + volumes = [ + "/root/.ssh:/root/.ssh:ro" + ] work_dir = "/ansible" command = "ansible-rulebook" args = ["-r", "rulebook.yml", "-i", "inventory.py", "-vvv"] diff --git a/ui/schemas/softwares.js b/ui/schemas/softwares.js index 2db02dce..9e5ffbdf 100644 --- a/ui/schemas/softwares.js +++ b/ui/schemas/softwares.js @@ -71,7 +71,7 @@ NEWSCHEMA('Softwares', function (schema) { .promise($); const settings = await DATA.read('nosql/variables') - .where('key', 'catalogs') + .where('key', 'softwares') .where('type', 'settings') .promise($);