Skip to content

Commit

Permalink
Stepupapps: Remove vm based tasks. Everything is docker now
Browse files Browse the repository at this point in the history
  • Loading branch information
quartje committed Jun 20, 2024
1 parent ca3c1f1 commit 0c6a9e4
Show file tree
Hide file tree
Showing 18 changed files with 579 additions and 1,080 deletions.
78 changes: 0 additions & 78 deletions roles/stepupazuremfa/tasks/docker.yml

This file was deleted.

83 changes: 77 additions & 6 deletions roles/stepupazuremfa/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,78 @@
- name: Include docker tasks when running docker
include_tasks: docker.yml
when: "'docker' in group_names"
- name: Include docker vars
ansible.builtin.include_vars: docker.yml

- name: Include vm tasks when running on a vm
include_tasks: vm.yml
when: "'docker' not in group_names"
- name: Add group {{ appname }}
ansible.builtin.group:
name: "{{ appname }}"
state: present
register: azuremfa_guid

- name: Add user {{ appname }}
ansible.builtin.user:
name: "{{ appname }}"
group: "{{ appname }}"
createhome: no
state: present
register: azuremfa_uid

- name: Create some dirs
ansible.builtin.file:
state: directory
dest: "{{ item }}"
owner: root
group: root
mode: "0755"
with_items:
- "{{ current_release_config_dir_name }}"
- "{{ current_release_appdir }}/public/images"

- name: Install images
ansible.builtin.include_role:
name: stepupapp
tasks_from: copyimages

- name: Install the GSSP certificates
ansible.builtin.include_role:
name: stepupapp
tasks_from: copygsspidpcerts

- name: Place parameters.yml
ansible.builtin.template:
src: parameters.yaml.j2
dest: "{{ current_release_config_dir_name }}/parameters.yaml"
mode: "0640"
owner: root
group: "{{ appname }}"
notify: restart azuremfa

- name: Put institutions.yaml from environment
ansible.builtin.template:
src: "{{ inventory_dir }}/files/stepup-azuremfa/institutions.yaml.j2"
dest: "{{ current_release_config_dir_name }}/institutions.yaml"
mode: "0640"
owner: root
group: "{{ appname }}"
notify: restart azuremfa

- name: Create the container
community.docker.docker_container:
name: "{{ appname }}"
image: ghcr.io/openconext/stepup-azuremfa/stepup-azuremfa:{{ azuremfa_version }}
pull: true
restart_policy: "always"
networks:
- name: "loadbalancer"
labels:
traefik.http.routers.azuremfa.rule: "Host(`azuremfa.{{ base_domain }}`)"
traefik.http.routers.azuremfa.tls: "true"
traefik.enable: "true"
env:
APACHE_UID: "#{{ azuremfa_uid.uid }}"
APACHE_GUID: "#{{ azuremfa_guid.gid }}"
mounts:
- source: /opt/openconext/azuremfa/public/images/header-logo.png
target: /var/www/html/public/build/images/header-logo.png
type: bind
- source: /opt/openconext/azuremfa
target: /var/www/html/config/openconext
type: bind
62 changes: 0 additions & 62 deletions roles/stepupazuremfa/tasks/vm.yml

This file was deleted.

135 changes: 0 additions & 135 deletions roles/stepupgateway/tasks/docker.yml

This file was deleted.

Loading

0 comments on commit 0c6a9e4

Please sign in to comment.