diff --git a/docs/roles/debian/phpmyadmin.md b/docs/roles/debian/phpmyadmin.md index 3c329c981..7eeb9bcca 100644 --- a/docs/roles/debian/phpmyadmin.md +++ b/docs/roles/debian/phpmyadmin.md @@ -1,7 +1,7 @@ # phpMyAdmin -This role only installs phpMyAdmin ready for configuration, it does not do any active configuration, nor does it create the necessary NGINX vhost. It will install `debian/php-fpm` and `debian/nginx` so do review their variables and set what you need prior to running a first build with `phpmyadmin`. +This role only installs phpMyAdmin ready for configuration, it does not do any active configuration, nor does it create the necessary NGINX vhost. It will install `debian/php-fpm` so do review the variables for PHP and set what you need prior to running a first build with `phpmyadmin`. -Here is an example NGINX vhost config you can copy to your `nginx.yml` file and adjust as required: +Similarly, it can optionally install `debian/nginx` if you set `phpmyadmin.install_nginx: true`, so if you do that be sure to provide a sensible NGINX config. Here is an example NGINX vhost config you can copy to your `nginx.yml` file and adjust as required: ```yaml nginx: @@ -54,6 +54,8 @@ phpmyadmin: # Assuming user and group should match php-fpm by default www_user: "{{ php.fpm.pool_user }}" www_group: "{{ php.fpm.pool_group }}" + install_nginx: false + ``` diff --git a/roles/debian/phpmyadmin/README.md b/roles/debian/phpmyadmin/README.md index 3c329c981..7eeb9bcca 100644 --- a/roles/debian/phpmyadmin/README.md +++ b/roles/debian/phpmyadmin/README.md @@ -1,7 +1,7 @@ # phpMyAdmin -This role only installs phpMyAdmin ready for configuration, it does not do any active configuration, nor does it create the necessary NGINX vhost. It will install `debian/php-fpm` and `debian/nginx` so do review their variables and set what you need prior to running a first build with `phpmyadmin`. +This role only installs phpMyAdmin ready for configuration, it does not do any active configuration, nor does it create the necessary NGINX vhost. It will install `debian/php-fpm` so do review the variables for PHP and set what you need prior to running a first build with `phpmyadmin`. -Here is an example NGINX vhost config you can copy to your `nginx.yml` file and adjust as required: +Similarly, it can optionally install `debian/nginx` if you set `phpmyadmin.install_nginx: true`, so if you do that be sure to provide a sensible NGINX config. Here is an example NGINX vhost config you can copy to your `nginx.yml` file and adjust as required: ```yaml nginx: @@ -54,6 +54,8 @@ phpmyadmin: # Assuming user and group should match php-fpm by default www_user: "{{ php.fpm.pool_user }}" www_group: "{{ php.fpm.pool_group }}" + install_nginx: false + ``` diff --git a/roles/debian/phpmyadmin/defaults/main.yml b/roles/debian/phpmyadmin/defaults/main.yml index 00960891a..24fbc46b3 100644 --- a/roles/debian/phpmyadmin/defaults/main.yml +++ b/roles/debian/phpmyadmin/defaults/main.yml @@ -5,4 +5,5 @@ phpmyadmin: install_path: "/home/{{ ce_deploy.username }}/deploy" # Assuming user and group should match php-fpm by default www_user: "{{ php.fpm.pool_user }}" - www_group: "{{ php.fpm.pool_group }}" \ No newline at end of file + www_group: "{{ php.fpm.pool_group }}" + install_nginx: false diff --git a/roles/debian/phpmyadmin/meta/main.yml b/roles/debian/phpmyadmin/meta/main.yml index 54ffd52ed..d0cf08b3d 100644 --- a/roles/debian/phpmyadmin/meta/main.yml +++ b/roles/debian/phpmyadmin/meta/main.yml @@ -1,4 +1,3 @@ --- dependencies: - - role: debian/nginx - role: debian/php-fpm diff --git a/roles/debian/phpmyadmin/tasks/main.yml b/roles/debian/phpmyadmin/tasks/main.yml index 474e867fb..b3fac7e2d 100644 --- a/roles/debian/phpmyadmin/tasks/main.yml +++ b/roles/debian/phpmyadmin/tasks/main.yml @@ -17,3 +17,8 @@ ansible.builtin.command: cmd: "/usr/local/bin/phpmyadmin.sh -u -v {{ phpmyadmin.version }}" when: phpmyadmin.method == 'upgrade' + +- name: Install the NGINX web server. + ansible.builtin.include_role: + name: debian/nginx + when: phpmyadmin.install_nginx