Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
vbotka committed Jan 16, 2024
2 parents 487807f + b813376 commit 4b435ef
Show file tree
Hide file tree
Showing 17 changed files with 151 additions and 117 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2016-2023, Vladimir Botka <vbotka@gmail.com>
Copyright (c) 2016-2024, Vladimir Botka <vbotka@gmail.com>
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
32 changes: 32 additions & 0 deletions changelog/CHANGELOG-v2.5.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
===============================
vbotka.apache 2.5 Release Notes
===============================

.. contents:: Topics


2.5.0
=====

Release Summary
---------------
Ansible 2.15 update

Major Changes
-------------
* Supported FreeBSD: 12.4, 13.2, 14.0

Minor Changes
-------------
* Bump docs version 2.5.0
* Update docs
* Update docs/requirements.txt; readthedocs-sphinx-search==0.3.2
* Update vars. Use ansible_parent_role_paths
* Update vars/main.yml.sample
* Update requirements.yml

Bugfixes
--------

Breaking Changes / Porting Guide
--------------------------------
4 changes: 2 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ apache_httpd_conf:
- {regexp: ServerTokens, line: "{{ apache_servertokens }}"}

# SSL
apache_ssllisten: ""
apache_ssllisten: ''
apache_sslcertificatefile: "/usr/local/etc/apache{{ apache_version }}/server.crt"
apache_sslcertificatekeyfile: "/usr/local/etc/apache{{ apache_version }}/server.key"
apache_sslprotocol: 'all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1'
apache_sslprotocol: all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
# apache_sslciphersuite: HIGH:!aNULL:!MD5
# apache_sslciphersuite: RC4-SHA:AES128-SHA:HIGH:!aNULL:!MD5
apache_sslciphersuite: "ECDHE-ECDSA-AES256-GCM-SHA384:\
Expand Down
32 changes: 16 additions & 16 deletions docs/annotation/annotation-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ mytasks:
variables, that will override default values, can be loaded from the files in the directory `vars
<https://github.com/vbotka/ansible-apache/blob/master/vars/>`_.
lines: 10,11
seealso: {'handlers': [], 'templates': [], 'others': ['See the precedence, naming conventions and other details in the included tasks (11) from `al_include_os_vars_path.yml <https://raw.githubusercontent.com/vbotka/ansible-lib/devel/tasks/al_include_os_vars_path.yml>`_', 'See :ref:`ug_variables`']}
lines: 5-6
seealso: {'handlers': [], 'templates': [], 'others': ['See the precedence, naming conventions and other details in the included tasks (6) from `al_include_os_vars_path.yml <https://raw.githubusercontent.com/vbotka/ansible-lib/devel/tasks/al_include_os_vars_path.yml>`_', 'See :ref:`ug_variables`']}
notes: ['Put OS specific variables here. Because of the precedence (15.role vars), there are limited options to override these variables, if necessary.']
hints: ['It might be more convenient to maintain the variables incrementally. See `al_include_os_vars_path_incr.yml <https://raw.githubusercontent.com/vbotka/ansible-lib/devel/tasks/al_include_os_vars_path_incr.yml>`_']
warnings: ['Put customized OS specific variables into the files in the dictionary *vars/*. Changes stored in the directory *vars/defaults* will be overwritten by an update of the role.']
Expand Down Expand Up @@ -73,7 +73,7 @@ mytasks:
<TBD>
lines: 3,12
lines: 3,17
seealso: {'handlers': [], 'templates': [], 'others': ['<TBD>']}
notes: []
hints: []
Expand Down Expand Up @@ -281,7 +281,7 @@ mytasks:
<TBD>
lines: 2
lines: 3
seealso: {'handlers': [], 'templates': [], 'others': ['<TBD>']}
notes: []
hints: []
Expand All @@ -292,33 +292,33 @@ mytasks:
path: tasks/httpd-confd-includes.yml
synopsis: |
Configure sections with the filter encode_apache.
Configure sections using the filter encode_apache.
description: |
Take the YAML configuration files from the directory ``apache_confd_dir_sections`` (7) at master
and create the configuration files (22) at the remote host. The created configuration files are
included in the configuration file ``httpd.conf`` by default. For example
Take the YAML configuration files from the directory ``apache_confd_dir_sections`` (8) at master
and create the configuration files (25) at the remote host. The created configuration files are
included in the configuration file ``httpd.conf`` by default. For example,
.. code-block:: yaml
shell> grep Includes /usr/local/etc/apache24/httpd.conf
Include etc/apache24/Includes/*.conf
**Include data from conf.d (3-17)**
**Include data from conf.d (3-20)**
Include tasks from the file ``al_include_confd_vars_list`` (12) in the role ``vbotka.ansible_lib``
(11). This task takes as parameters the directory of the YAML configuration files (7) and the
type of the list (8), and returns the list with the YAML configurations of the sections stored in
the variable ``al_include_confd_vars_list``. The parameters (7,8) are tested inside the included
Include tasks from the file ``al_include_confd_vars_list`` (14) in the role ``vbotka.ansible_lib``
(13). This task takes as parameters the directory of the YAML configuration files (8) and the
type of the list (9), and returns the list with the YAML configurations of the sections stored in
the variable ``al_include_confd_vars_list``. The parameters (8,9) are tested inside the included
tasks.
**Configure sections in Includes directory (19-28)**
**Configure sections in Includes directory (22-31)**
Use the ``encode_apache`` filter to create the configuration files (22) for the sections. See the
Use the filter ``encode_apache`` to create the configuration files (25) for the sections. See the
template ``section2.j2``.
lines: 3,19
lines: 3,22
seealso: {'handlers': [], 'templates': ['section2'], 'others': ['Example of the configuration file `vars/conf.d/section-sample/usr-local-www-example.com.yml <https://github.com/vbotka/ansible-apache/blob/master/vars/conf.d/section-sample/usr-local-www-example.com.yml>`_', 'Details of the format are described in the filter `encode_apache <https://galaxy.ansible.com/jtyr/config_encoder_filters>`_']}
notes: []
hints: []
Expand Down
24 changes: 12 additions & 12 deletions docs/annotation/vars/httpd-confd-includes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,33 @@

task_httpd-confd-includes_synopsis: |
Configure sections with the filter encode_apache.
Configure sections using the filter encode_apache.
task_httpd-confd-includes_description: |
Take the YAML configuration files from the directory ``apache_confd_dir_sections`` (7) at master
and create the configuration files (22) at the remote host. The created configuration files are
included in the configuration file ``httpd.conf`` by default. For example
Take the YAML configuration files from the directory ``apache_confd_dir_sections`` (8) at master
and create the configuration files (25) at the remote host. The created configuration files are
included in the configuration file ``httpd.conf`` by default. For example,
.. code-block:: yaml
shell> grep Includes /usr/local/etc/apache24/httpd.conf
Include etc/apache24/Includes/*.conf
**Include data from conf.d (3-17)**
**Include data from conf.d (3-20)**
Include tasks from the file ``al_include_confd_vars_list`` (12) in the role ``vbotka.ansible_lib``
(11). This task takes as parameters the directory of the YAML configuration files (7) and the
type of the list (8), and returns the list with the YAML configurations of the sections stored in
the variable ``al_include_confd_vars_list``. The parameters (7,8) are tested inside the included
Include tasks from the file ``al_include_confd_vars_list`` (14) in the role ``vbotka.ansible_lib``
(13). This task takes as parameters the directory of the YAML configuration files (8) and the
type of the list (9), and returns the list with the YAML configurations of the sections stored in
the variable ``al_include_confd_vars_list``. The parameters (8,9) are tested inside the included
tasks.
**Configure sections in Includes directory (19-28)**
**Configure sections in Includes directory (22-31)**
Use the ``encode_apache`` filter to create the configuration files (22) for the sections. See the
Use the filter ``encode_apache`` to create the configuration files (25) for the sections. See the
template ``section2.j2``.
task_httpd-confd-includes_lines: 3,19
task_httpd-confd-includes_lines: 3,22

task_httpd-confd-includes_seealso:
handlers: []
Expand Down
2 changes: 1 addition & 1 deletion docs/annotation/vars/httpd-confd-vhosts-dirs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ task_httpd-confd-vhost-dirs_description: |
<TBD>
task_httpd-confd-vhost-dirs_lines: 2
task_httpd-confd-vhost-dirs_lines: 3

task_httpd-confd-vhost-dirs_seealso:
handlers: []
Expand Down
2 changes: 1 addition & 1 deletion docs/annotation/vars/packages-freebsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ task_packages-freebsd_description: |
<TBD>
task_packages-freebsd_lines: 3,12
task_packages-freebsd_lines: 3,17

task_packages-freebsd_seealso:
handlers: []
Expand Down
4 changes: 2 additions & 2 deletions docs/annotation/vars/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ task_vars_description: |
variables, that will override default values, can be loaded from the files in the directory `vars
<https://github.com/vbotka/ansible-apache/blob/master/vars/>`_.
task_vars_lines: 10,11
task_vars_lines: 5-6

task_vars_seealso:
handlers: []
templates: []
others:

- See the precedence, naming conventions and other details in the included tasks (11) from
- See the precedence, naming conventions and other details in the included tasks (6) from
`al_include_os_vars_path.yml <https://raw.githubusercontent.com/vbotka/ansible-lib/devel/tasks/al_include_os_vars_path.yml>`_

- See :ref:`ug_variables`
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sphinx==7.2.6
sphinx_rtd_theme==1.3.0
readthedocs-sphinx-search==0.3.1
readthedocs-sphinx-search==0.3.2
32 changes: 16 additions & 16 deletions docs/source/annotation-tasks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ variables, that will override default values, can be loaded from the files in th
:linenothreshold: 5
.. literalinclude:: ../../tasks/vars.yml
:language: Yaml
:emphasize-lines: 10,11
:emphasize-lines: 5-6
:linenos:

.. seealso::
* See the precedence, naming conventions and other details in the included tasks (11) from `al_include_os_vars_path.yml <https://raw.githubusercontent.com/vbotka/ansible-lib/devel/tasks/al_include_os_vars_path.yml>`_
* See the precedence, naming conventions and other details in the included tasks (6) from `al_include_os_vars_path.yml <https://raw.githubusercontent.com/vbotka/ansible-lib/devel/tasks/al_include_os_vars_path.yml>`_
* See :ref:`ug_variables`

.. note::
Expand Down Expand Up @@ -134,7 +134,7 @@ Synopsis:
:linenothreshold: 5
.. literalinclude:: ../../tasks/packages-freebsd.yml
:language: Yaml
:emphasize-lines: 3,12
:emphasize-lines: 3,17
:linenos:

.. seealso::
Expand Down Expand Up @@ -459,7 +459,7 @@ Create ``DocumentRoot`` directories for vhosts.
:linenothreshold: 5
.. literalinclude:: ../../tasks/fn/httpd-confd-vhost-dirs.yml
:language: Yaml
:emphasize-lines: 2
:emphasize-lines: 3
:linenos:

.. seealso::
Expand All @@ -474,30 +474,30 @@ httpd-confd-includes.yml
------------------------

Synopsis:
Configure sections with the filter encode_apache.
Configure sections using the filter encode_apache.



Take the YAML configuration files from the directory ``apache_confd_dir_sections`` (7) at master
and create the configuration files (22) at the remote host. The created configuration files are
included in the configuration file ``httpd.conf`` by default. For example
Take the YAML configuration files from the directory ``apache_confd_dir_sections`` (8) at master
and create the configuration files (25) at the remote host. The created configuration files are
included in the configuration file ``httpd.conf`` by default. For example,

.. code-block:: yaml
shell> grep Includes /usr/local/etc/apache24/httpd.conf
Include etc/apache24/Includes/*.conf
**Include data from conf.d (3-17)**
**Include data from conf.d (3-20)**

Include tasks from the file ``al_include_confd_vars_list`` (12) in the role ``vbotka.ansible_lib``
(11). This task takes as parameters the directory of the YAML configuration files (7) and the
type of the list (8), and returns the list with the YAML configurations of the sections stored in
the variable ``al_include_confd_vars_list``. The parameters (7,8) are tested inside the included
Include tasks from the file ``al_include_confd_vars_list`` (14) in the role ``vbotka.ansible_lib``
(13). This task takes as parameters the directory of the YAML configuration files (8) and the
type of the list (9), and returns the list with the YAML configurations of the sections stored in
the variable ``al_include_confd_vars_list``. The parameters (8,9) are tested inside the included
tasks.

**Configure sections in Includes directory (19-28)**
**Configure sections in Includes directory (22-31)**

Use the ``encode_apache`` filter to create the configuration files (22) for the sections. See the
Use the filter ``encode_apache`` to create the configuration files (25) for the sections. See the
template ``section2.j2``.


Expand All @@ -507,7 +507,7 @@ template ``section2.j2``.
:linenothreshold: 5
.. literalinclude:: ../../tasks/httpd-confd-includes.yml
:language: Yaml
:emphasize-lines: 3,19
:emphasize-lines: 3,22
:linenos:

.. seealso::
Expand Down
6 changes: 3 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,17 @@

# General information about the project.
project = 'ansible-role-apache'
copyright = '2019-2023, Vladimir Botka'
copyright = '2019-2024, Vladimir Botka'
author = 'Vladimir Botka'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '2.4'
version = '2.5'
# The full version, including alpha/beta/rc tags.
release = '2.4.2'
release = '2.5.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
3 changes: 2 additions & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ galaxy_info:
company: https://botka.info
github_branch: master
license: BSD
min_ansible_version: "2.14"
min_ansible_version: "2.15"
platforms:
- name: FreeBSD
versions:
- 12.4
- 13.2
- 14.0
galaxy_tags:
- freebsd
- apache
Expand Down
2 changes: 1 addition & 1 deletion requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
name: jtyr.config_encoder_filters

- src: https://github.com/vbotka/ansible-lib
version: 2.4.2
version: 2.6.0
name: vbotka.ansible_lib
...
5 changes: 4 additions & 1 deletion tasks/httpd-confd-includes.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
---

- name: "httpd-confd-includes: Include sections from {{ apache_confd_dir_sections }}"
- name: Include sections from apache_confd_dir_sections
block:

- name: "httpd-confd-includes: Set variables for al_include_confd_vars_list"
ansible.builtin.set_fact:
al_include_confd_dir: "{{ apache_confd_dir_sections }}"
al_include_confd_vars_list_type: fname

- name: "httpd-confd-includes: Include al_include_confd_vars_list"
ansible.builtin.include_role:
name: vbotka.ansible_lib
tasks_from: al_include_confd_vars_list

- name: "httpd-confd-includes: Debug al_include_confd_vars_list"
ansible.builtin.debug:
var: item
Expand Down
1 change: 1 addition & 0 deletions tasks/packages-freebsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@
ansible.builtin.debug:
var: result
when: apache_debug|bool

# EOF
...
13 changes: 5 additions & 8 deletions tasks/vars.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
---

- name: "vars: Include OS vars"
block:
- name: "vars: Set variables for al_include_os_vars_path"
ansible.builtin.set_fact:
al_os_vars_path: "{{ role_path }}"
- name: "vars: Include OS vars"
ansible.builtin.include_role:
name: vbotka.ansible_lib
tasks_from: al_include_os_vars_path
ansible.builtin.include_role:
name: vbotka.ansible_lib
tasks_from: al_include_os_vars_path
vars:
al_os_vars_path: "{{ ansible_parent_role_paths.0 }}"

# EOF
...

0 comments on commit 4b435ef

Please sign in to comment.