Loading defaults/main.yaml +12 −0 Original line number Diff line number Diff line Loading @@ -11,3 +11,15 @@ semaphore_email_host: "smtp" semaphore_email_port: "465" semaphore_email_username: "smtp-user" semaphore_email_password: "smtp-pass" # semaphore ansible ssh key semaphore_ansible_ssh_key: "supersecure" # semaphore ssh config semaphore_ssh_config: | host * user ansible identityfile /home/semaphore/.ssh/ansible.key addressfamily inet stricthostkeychecking no userknownhostsfile /dev/null tasks/install.yaml +21 −13 Original line number Diff line number Diff line Loading @@ -11,8 +11,27 @@ loop: - "/mnt/semaphore" - "/mnt/semaphore/data" - "/mnt/semaphore/ssh" - "/mnt/semaphore/tmp" # semaphore ssh config - name: "ssh config" ansible.builtin.template: src: "templates/semaphore/config.j2" dest: "/mnt/semaphore/ssh/config" owner: "1001" group: "1001" mode: "0640" # semaphore ansible ssh key - name: "ansible ssh config" ansible.builtin.template: src: "templates/semaphore/ansible.key.j2" dest: "/mnt/semaphore/ssh/ansible.key" owner: "1001" group: "1001" mode: "0400" # run semaphore - name: "run semaphore" community.docker.docker_container: Loading Loading @@ -43,6 +62,8 @@ network_mode: "host" volumes: - "/mnt/semaphore/ssh/config:/home/semaphore/.ssh/config" - "/mnt/semaphore/ssh/ansible.key:/home/semaphore/.ssh/ansible.key" - "/mnt/semaphore/data:/var/lib/semaphore" - "/mnt/semaphore/tmp:/tmp/semaphore" Loading @@ -51,23 +72,10 @@ env: # ansible ANSIBLE_HOST_KEY_CHECKING: "False" # semaphore SEMAPHORE_EMAIL_SENDER: "{{ semaphore_email_sender }}" SEMAPHORE_EMAIL_USERNAME: "{{ semaphore_email_username }}" SEMAPHORE_EMAIL_HOST: "{{ semaphore_email_host }}" SEMAPHORE_EMAIL_PORT: "{{ semaphore_email_port }}" SEMAPHORE_EMAIL_PASSWORD: "{{ semaphore_email_password }}" SEMAPHORE_EMAIL_SECURE: "True" SEMAPHORE_EMAIL_TLS: "True" SEMAPHORE_DB_DIALECT: "sqlite" SEMAPHORE_RUNNER_REGISTRATION_TOKEN: "{{ semaphore_runner_token }}" SEMAPHORE_TOTP_ALLOW_RECOVERY: "True" SEMAPHORE_TOTP_ENABLED: "True" SEMAPHORE_USE_REMOTE_RUNNER: "True" SEMAPHORE_SCHEDULE_TIMEZONE: "Europe/Amsterdam" # global Loading templates/semaphore/ansible.key.j2 0 → 100644 +1 −0 Original line number Diff line number Diff line {{ semaphore_ansible_ssh_key }} templates/semaphore/config.j2 0 → 100644 +1 −0 Original line number Diff line number Diff line {{ semaphore_ssh_config }} Loading
defaults/main.yaml +12 −0 Original line number Diff line number Diff line Loading @@ -11,3 +11,15 @@ semaphore_email_host: "smtp" semaphore_email_port: "465" semaphore_email_username: "smtp-user" semaphore_email_password: "smtp-pass" # semaphore ansible ssh key semaphore_ansible_ssh_key: "supersecure" # semaphore ssh config semaphore_ssh_config: | host * user ansible identityfile /home/semaphore/.ssh/ansible.key addressfamily inet stricthostkeychecking no userknownhostsfile /dev/null
tasks/install.yaml +21 −13 Original line number Diff line number Diff line Loading @@ -11,8 +11,27 @@ loop: - "/mnt/semaphore" - "/mnt/semaphore/data" - "/mnt/semaphore/ssh" - "/mnt/semaphore/tmp" # semaphore ssh config - name: "ssh config" ansible.builtin.template: src: "templates/semaphore/config.j2" dest: "/mnt/semaphore/ssh/config" owner: "1001" group: "1001" mode: "0640" # semaphore ansible ssh key - name: "ansible ssh config" ansible.builtin.template: src: "templates/semaphore/ansible.key.j2" dest: "/mnt/semaphore/ssh/ansible.key" owner: "1001" group: "1001" mode: "0400" # run semaphore - name: "run semaphore" community.docker.docker_container: Loading Loading @@ -43,6 +62,8 @@ network_mode: "host" volumes: - "/mnt/semaphore/ssh/config:/home/semaphore/.ssh/config" - "/mnt/semaphore/ssh/ansible.key:/home/semaphore/.ssh/ansible.key" - "/mnt/semaphore/data:/var/lib/semaphore" - "/mnt/semaphore/tmp:/tmp/semaphore" Loading @@ -51,23 +72,10 @@ env: # ansible ANSIBLE_HOST_KEY_CHECKING: "False" # semaphore SEMAPHORE_EMAIL_SENDER: "{{ semaphore_email_sender }}" SEMAPHORE_EMAIL_USERNAME: "{{ semaphore_email_username }}" SEMAPHORE_EMAIL_HOST: "{{ semaphore_email_host }}" SEMAPHORE_EMAIL_PORT: "{{ semaphore_email_port }}" SEMAPHORE_EMAIL_PASSWORD: "{{ semaphore_email_password }}" SEMAPHORE_EMAIL_SECURE: "True" SEMAPHORE_EMAIL_TLS: "True" SEMAPHORE_DB_DIALECT: "sqlite" SEMAPHORE_RUNNER_REGISTRATION_TOKEN: "{{ semaphore_runner_token }}" SEMAPHORE_TOTP_ALLOW_RECOVERY: "True" SEMAPHORE_TOTP_ENABLED: "True" SEMAPHORE_USE_REMOTE_RUNNER: "True" SEMAPHORE_SCHEDULE_TIMEZONE: "Europe/Amsterdam" # global Loading
templates/semaphore/ansible.key.j2 0 → 100644 +1 −0 Original line number Diff line number Diff line {{ semaphore_ansible_ssh_key }}
templates/semaphore/config.j2 0 → 100644 +1 −0 Original line number Diff line number Diff line {{ semaphore_ssh_config }}