From 342271c524646823a9cde461690129ecdf36202b Mon Sep 17 00:00:00 2001 From: Florent THOMAS Date: Fri, 29 Dec 2023 15:14:17 +0100 Subject: [PATCH 1/4] Allow to set vhost_conf_template per item --- tasks/vhosts.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/vhosts.yml b/tasks/vhosts.yml index 5d8f7c1..2c76577 100644 --- a/tasks/vhosts.yml +++ b/tasks/vhosts.yml @@ -14,7 +14,7 @@ - name: vhosts | Configure vhosts ansible.builtin.template: - src: "{{ vhost_conf_template }}" + src: "{{ item.vhost_conf_template | default(vhost_conf_template) }}" dest: "{{ httpd_vhosts_directory }}/{{ item.name }}.conf" mode: "0644" loop: "{{ httpd_vhosts }}" From f6cbd865dfaaf5066f454dda1642808e5eab4fda Mon Sep 17 00:00:00 2001 From: Florent THOMAS Date: Fri, 29 Dec 2023 15:16:29 +0100 Subject: [PATCH 2/4] [DOC]explain how to use per item templates --- README.md | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 55b67a8..02af700 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ Install and configure httpd on your system. -|GitHub|GitLab|Downloads|Version| -|------|------|---------|-------| -|[![github](https://github.com/robertdebock/ansible-role-httpd/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-httpd/actions)|[![gitlab](https://gitlab.com/robertdebock-iac/ansible-role-httpd/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-httpd)|[![downloads](https://img.shields.io/ansible/role/d/24514)](https://galaxy.ansible.com/robertdebock/httpd)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-httpd.svg)](https://github.com/robertdebock/ansible-role-httpd/releases/)| +| GitHub | GitLab | Downloads | Version | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| [![github](https://github.com/robertdebock/ansible-role-httpd/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-httpd/actions) | [![gitlab](https://gitlab.com/robertdebock-iac/ansible-role-httpd/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-httpd) | [![downloads](https://img.shields.io/ansible/role/d/24514)](https://galaxy.ansible.com/robertdebock/httpd) | [![Version](https://img.shields.io/github/release/robertdebock/ansible-role-httpd.svg)](https://github.com/robertdebock/ansible-role-httpd/releases/) | ## [Example Playbook](#example-playbook) @@ -34,6 +34,10 @@ This example is taken from [`molecule/default/converge.yml`](https://github.com/ # - name: my_vhost_docroot # servername: www1.example.com # documentroot: "{{ httpd_data_directory }}/www1.example.com" + # - name: my_vhost_docroot_with_my_template + # servername: www1.example.com + # documentroot: "{{ httpd_data_directory }}/www1.example.com" + # vhost_conf_template: "/full/path/to/your/template.j2" # - name: my_vhost_backend_http # servername: www2.example.com # backend_url: "http://www.example.com/" @@ -149,14 +153,14 @@ default_vhost_conf: default_vhost.conf The following roles are used to prepare a system. You can prepare your system in another way. -| Requirement | GitHub | GitLab | -|-------------|--------|--------| -|[robertdebock.bootstrap](https://galaxy.ansible.com/robertdebock/bootstrap)|[![Build Status GitHub](https://github.com/robertdebock/ansible-role-bootstrap/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-bootstrap/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-bootstrap/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-bootstrap)| -|[robertdebock.buildtools](https://galaxy.ansible.com/robertdebock/buildtools)|[![Build Status GitHub](https://github.com/robertdebock/ansible-role-buildtools/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-buildtools/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-buildtools/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-buildtools)| -|[robertdebock.epel](https://galaxy.ansible.com/robertdebock/epel)|[![Build Status GitHub](https://github.com/robertdebock/ansible-role-epel/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-epel/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-epel/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-epel)| -|[robertdebock.openssl](https://galaxy.ansible.com/robertdebock/openssl)|[![Build Status GitHub](https://github.com/robertdebock/ansible-role-openssl/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-openssl/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-openssl/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-openssl)| -|[robertdebock.python_pip](https://galaxy.ansible.com/robertdebock/python_pip)|[![Build Status GitHub](https://github.com/robertdebock/ansible-role-python_pip/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-python_pip/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-python_pip/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-python_pip)| -|[robertdebock.selinux](https://galaxy.ansible.com/robertdebock/selinux)|[![Build Status GitHub](https://github.com/robertdebock/ansible-role-selinux/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-selinux/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-selinux/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-selinux)| +| Requirement | GitHub | GitLab | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [robertdebock.bootstrap](https://galaxy.ansible.com/robertdebock/bootstrap) | [![Build Status GitHub](https://github.com/robertdebock/ansible-role-bootstrap/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-bootstrap/actions) | [![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-bootstrap/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-bootstrap) | +| [robertdebock.buildtools](https://galaxy.ansible.com/robertdebock/buildtools) | [![Build Status GitHub](https://github.com/robertdebock/ansible-role-buildtools/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-buildtools/actions) | [![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-buildtools/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-buildtools) | +| [robertdebock.epel](https://galaxy.ansible.com/robertdebock/epel) | [![Build Status GitHub](https://github.com/robertdebock/ansible-role-epel/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-epel/actions) | [![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-epel/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-epel) | +| [robertdebock.openssl](https://galaxy.ansible.com/robertdebock/openssl) | [![Build Status GitHub](https://github.com/robertdebock/ansible-role-openssl/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-openssl/actions) | [![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-openssl/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-openssl) | +| [robertdebock.python_pip](https://galaxy.ansible.com/robertdebock/python_pip) | [![Build Status GitHub](https://github.com/robertdebock/ansible-role-python_pip/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-python_pip/actions) | [![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-python_pip/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-python_pip) | +| [robertdebock.selinux](https://galaxy.ansible.com/robertdebock/selinux) | [![Build Status GitHub](https://github.com/robertdebock/ansible-role-selinux/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-selinux/actions) | [![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-selinux/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-selinux) | ## [Context](#context) @@ -169,13 +173,13 @@ Here is an overview of related roles: This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): -|container|tags| -|---------|----| -|[EL](https://hub.docker.com/r/robertdebock/enterpriselinux)|8, 9| -|[Debian](https://hub.docker.com/r/robertdebock/debian)|all| -|[Fedora](https://hub.docker.com/r/robertdebock/fedora/)|all| -|[opensuse](https://hub.docker.com/r/robertdebock/opensuse)|all| -|[Ubuntu](https://hub.docker.com/r/robertdebock/ubuntu)|all| +| container | tags | +| ----------------------------------------------------------- | ---- | +| [EL](https://hub.docker.com/r/robertdebock/enterpriselinux) | 8, 9 | +| [Debian](https://hub.docker.com/r/robertdebock/debian) | all | +| [Fedora](https://hub.docker.com/r/robertdebock/fedora/) | all | +| [opensuse](https://hub.docker.com/r/robertdebock/opensuse) | all | +| [Ubuntu](https://hub.docker.com/r/robertdebock/ubuntu) | all | The minimum version of Ansible required is 2.12, tests have been done to: From 56ac508a7e2a4865a04dd5e0508aba2ef435d176 Mon Sep 17 00:00:00 2001 From: Florent THOMAS Date: Wed, 3 Jan 2024 10:33:53 +0100 Subject: [PATCH 3/4] Conflicts README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 02af700..461552c 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ Install and configure httpd on your system. -| GitHub | GitLab | Downloads | Version | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +|GitHub|GitLab|Downloads|Version| +|------|------|---------|-------| | [![github](https://github.com/robertdebock/ansible-role-httpd/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-httpd/actions) | [![gitlab](https://gitlab.com/robertdebock-iac/ansible-role-httpd/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-httpd) | [![downloads](https://img.shields.io/ansible/role/d/24514)](https://galaxy.ansible.com/robertdebock/httpd) | [![Version](https://img.shields.io/github/release/robertdebock/ansible-role-httpd.svg)](https://github.com/robertdebock/ansible-role-httpd/releases/) | ## [Example Playbook](#example-playbook) From 5a3b719119d4b6bfce2820c7be43cfa7baf6511a Mon Sep 17 00:00:00 2001 From: Florent THOMAS Date: Wed, 3 Jan 2024 10:35:26 +0100 Subject: [PATCH 4/4] Fix more conflicts README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 461552c..b640e35 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Install and configure httpd on your system. |GitHub|GitLab|Downloads|Version| |------|------|---------|-------| -| [![github](https://github.com/robertdebock/ansible-role-httpd/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-httpd/actions) | [![gitlab](https://gitlab.com/robertdebock-iac/ansible-role-httpd/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-httpd) | [![downloads](https://img.shields.io/ansible/role/d/24514)](https://galaxy.ansible.com/robertdebock/httpd) | [![Version](https://img.shields.io/github/release/robertdebock/ansible-role-httpd.svg)](https://github.com/robertdebock/ansible-role-httpd/releases/) | +|[![github](https://github.com/robertdebock/ansible-role-httpd/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-httpd/actions)|[![gitlab](https://gitlab.com/robertdebock-iac/ansible-role-httpd/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-httpd)|[![downloads](https://img.shields.io/ansible/role/d/robertdebock/httpd)](https://galaxy.ansible.com/robertdebock/httpd)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-httpd.svg)](https://github.com/robertdebock/ansible-role-httpd/releases/)| ## [Example Playbook](#example-playbook)