mirror of
https://github.com/inofix/common-playbooks.git
synced 2026-02-05 12:45:29 +01:00
Apache Modules
Store more infos in the dict mainly to address the nameing constraints in ansible.
This commit is contained in:
@@ -15,9 +15,8 @@
|
||||
vars:
|
||||
app__apache__mod_pkgs: '{{ os__pkg_name.apache_mod[os__short] | d(os__pkg_name.apache_mod[os__distro]) }}'
|
||||
## app__apache__mods: '{{ app__apache__modules | list() | unique() }}'
|
||||
app__apache__mod_helper: '{% for key, value in app__apache__modules.items() %}{% if value == True %}{{ app__apache__mod_pkgs[key] | d() }};{% endif %}{% endfor %}'
|
||||
app__apache__mod_helper: '{% for key, value in app__apache__modules.items() %}{% if value.enable == True %}{{ app__apache__mod_pkgs[key] | d() }};{% endif %}{% endfor %}'
|
||||
app__apache__yapkg__names: '{{ os__pkg_name.apache[os__short] | d(os__pkg_name.apache[os__distro]) }} + {{ app__apache__mod_helper.split(";") }}'
|
||||
|
||||
# use fqdn if ansible_fqdn is not set
|
||||
#TODO why is it not forwarded from reclass?
|
||||
# ansible_fqdn: '{{ fqdn }}'
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
---
|
||||
- name: "Enable configs"
|
||||
command: 'a2enconf {{ item.key }}'
|
||||
when: '{{ item.value }}'
|
||||
command: 'a2enconf {{ item.value.name }}'
|
||||
when: '{{ item.value.enable }}'
|
||||
with_dict: '{{ app__apache__configs }}'
|
||||
|
||||
- name: "Enable modules"
|
||||
command: 'a2enmod {{ item.key }}'
|
||||
when: '{{ item.value }}'
|
||||
command: 'a2enmod {{ item.value.name }}'
|
||||
when: '{{ item.value.enable }}'
|
||||
with_dict: '{{ app__apache__modules }}'
|
||||
|
||||
- name: "Production level settings - part I"
|
||||
|
||||
Reference in New Issue
Block a user