Added OIDC draft für wordpress

This commit is contained in:
2025-04-17 11:51:37 +02:00
parent 7d5d69c380
commit 7e24d9b1c3
18 changed files with 91 additions and 33 deletions

View File

@@ -0,0 +1,12 @@
- name: "{{ role_name }} | Run WordPress core install via WP CLI"
command: >
docker-compose exec -T -u www-data application
wp core install
--url="https://{{ domains[application_id][0] }}"
--title="{{ applications[application_id].title }}"
--admin_user="{{ applications[application_id].credentials.administrator.username }}"
--admin_password="{{ applications[application_id].credentials.administrator.password }}"
--admin_email="{{ applications[application_id].credentials.administrator.email }}"
--path="{{ wordpress_docker_html_path }}"
args:
chdir: "{{ docker_compose.directories.instance }}"

View File

@@ -1,9 +1,9 @@
---
- name: "include docker-central-database"
- name: "{{ role_name }} | Include docker-central-database"
include_role:
name: docker-central-database
- name: "include role nginx-domain-setup for {{ application_id }}"
- name: "{{ role_name }} | Include role nginx-domain-setup for {{ application_id }}"
include_role:
name: nginx-domain-setup
loop: "{{ domains.wordpress }}"
@@ -13,23 +13,30 @@
nginx_docker_reverse_proxy_extra_configuration: "client_max_body_size {{ wordpress_max_upload_size }};"
http_port: "{{ ports.localhost.http[application_id] }}"
- name: "Transfering upload.ini to {{ docker_compose.directories.instance }}"
- name: "{{ role_name }} | Transfering upload.ini to {{ docker_compose.directories.instance }}"
template:
src: upload.ini.j2
dest: "{{ docker_compose.directories.instance }}upload.ini"
notify: docker compose project build and setup
- name: "Transfering msmtprc to {{ host_msmtp_conf }}"
- name: "{{ role_name }} | Transfering msmtprc to {{ host_msmtp_conf }}"
template:
src: "{{ playbook_dir }}/roles/msmtp/templates/msmtprc.conf.j2"
dest: "{{ host_msmtp_conf }}"
notify: docker compose project build and setup
- name: "Transfering Dockerfile to {{ docker_compose.directories.instance }}"
- name: "{{ role_name }} | Transfering Dockerfile to {{ docker_compose.directories.instance }}"
copy:
src: Dockerfile
dest: "{{ docker_compose.directories.instance }}Dockerfile"
notify: docker compose project build and setup
- name: "copy docker-compose.yml and env file"
- name: "{{ role_name }} | copy docker-compose.yml and env file"
include_tasks: copy-docker-compose-and-env.yml
- name: "{{ role_name }} | Install wordpress"
include_tasks: install.yml
- name: "{{ role_name }} | Activating OIDC when enabled."
include_tasks: oidc.yml
when: applications[application_id].oidc.enabled | bool

View File

@@ -0,0 +1,16 @@
---
- name: "{{ role_name }} | Install OpenID Connect Generic Plugin via WP CLI"
command: >
docker-compose exec -u www-data -T application
wp plugin install daggerhart-openid-connect-generic
--path={{ wordpress_docker_html_path }}
args:
chdir: "{{ docker_compose.directories.instance }}"
- name: "{{ role_name }} | Activate OpenID Connect Generic Plugin"
command: >
docker-compose exec -u www-data -T application
wp plugin activate daggerhart-openid-connect-generic
--path={{ wordpress_docker_html_path }}
args:
chdir: "{{ docker_compose.directories.instance }}"