Skip to content

Commit

Permalink
refactor(formula): align to template-formula & improve ci
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Module .sls files are moved to /config/modules/ subdirectory.
template-formula alignment may introduce a breaking change. See README for states.

feat(arch): add archlinux support
  • Loading branch information
noelmcloughlin committed Oct 3, 2020
1 parent fa93df9 commit 61d3646
Show file tree
Hide file tree
Showing 163 changed files with 6,021 additions and 2,605 deletions.
3 changes: 2 additions & 1 deletion .salt-lint
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ rules:
ignore: |
apache/files/Debian/ssl.conf.jinja
apache/files/FreeBSD/mod_ssl.conf.jinja
apache/files/tls-defaults.conf.jinja
apache/files/ssl/tls-defaults.conf.jinja
test/salt/pillar/modules.sls
skip_list:
# Using `salt-lint` for linting other files as well, such as Jinja macros/templates
- 205 # Use ".sls" as a Salt State file extension
Expand Down
61 changes: 32 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,35 +58,38 @@ jobs:
## Define the rest of the matrix based on Kitchen testing
# Make sure the instances listed below match up with
# the `platforms` defined in `kitchen.yml`
- env: INSTANCE=default-debian-10-master-py3
# - env: INSTANCE=default-ubuntu-1804-master-py3
# - env: INSTANCE=default-centos-8-master-py3
# - env: INSTANCE=default-fedora-31-master-py3
# - env: INSTANCE=default-opensuse-leap-151-master-py3
# - env: INSTANCE=default-amazonlinux-2-master-py3
# - env: INSTANCE=default-debian-10-2019-2-py3
# - env: INSTANCE=default-debian-9-2019-2-py3
- env: INSTANCE=default-ubuntu-1804-2019-2-py3
# - env: INSTANCE=default-centos-8-2019-2-py3
# - env: INSTANCE=default-fedora-31-2019-2-py3
# - env: INSTANCE=default-opensuse-leap-151-2019-2-py3
# - env: INSTANCE=default-centos-7-2019-2-py2
- env: INSTANCE=default-amazonlinux-2-2019-2-py3
# - env: INSTANCE=default-arch-base-latest-2019-2-py2
- env: INSTANCE=default-fedora-30-2018-3-py3
# - env: INSTANCE=default-debian-9-2018-3-py2
# - env: INSTANCE=default-ubuntu-1604-2018-3-py2
# - env: INSTANCE=default-centos-7-2018-3-py2
# - env: INSTANCE=default-opensuse-leap-151-2018-3-py2
# - env: INSTANCE=default-amazonlinux-1-2018-3-py2
# - env: INSTANCE=default-arch-base-latest-2018-3-py2
# - env: INSTANCE=default-debian-8-2017-7-py2
# - env: INSTANCE=default-ubuntu-1604-2017-7-py2
- env: INSTANCE=default-centos-6-2017-7-py2
# - env: INSTANCE=default-fedora-30-2017-7-py2
# - env: INSTANCE=default-opensuse-leap-151-2017-7-py2
# - env: INSTANCE=default-amazonlinux-1-2017-7-py2
# - env: INSTANCE=default-arch-base-latest-2017-7-py2
- env: INSTANCE=modules-debian-10-master-py3
# env: INSTANCE=modules-ubuntu-1804-master-py3
- env: INSTANCE=modules-centos-8-master-py3
- env: INSTANCE=modules-fedora-31-master-py3
- env: INSTANCE=modules-opensuse-leap-151-master-py3

# https://community.letsencrypt.org/t/localhost-crt-does-not-exist-or-is-empty/103979
- env: INSTANCE=default-amazonlinux-2-master-py3

# - env: INSTANCE=modules-debian-10-2019-2-py3
# - env: INSTANCE=modules-debian-9-2019-2-py3
- env: INSTANCE=modules-ubuntu-1804-2019-2-py3
# - env: INSTANCE=modules-centos-8-2019-2-py3
# - env: INSTANCE=modules-fedora-31-2019-2-py3
# - env: INSTANCE=suse-opensuse-leap-151-2019-2-py3
- env: INSTANCE=modules-centos-7-2019-2-py2
# env: INSTANCE=default-amazonlinux-2-2019-2-py3
# - env: INSTANCE=modules-arch-base-latest-2019-2-py2
# env: INSTANCE=modules-fedora-30-2018-3-py3
# - env: INSTANCE=modules-debian-9-2018-3-py2
# - env: INSTANCE=modules-ubuntu-1604-2018-3-py2
# - env: INSTANCE=modules-centos-7-2018-3-py2
# - env: INSTANCE=modules-opensuse-leap-151-2018-3-py2
# - env: INSTANCE=modules-amazonlinux-1-2018-3-py2
# - env: INSTANCE=modules-arch-base-latest-2018-3-py2
# - env: INSTANCE=modules-debian-8-2017-7-py2
# - env: INSTANCE=modules-ubuntu-1604-2017-7-py2
# env: INSTANCE=default-centos-6-2017-7-py2
# - env: INSTANCE=modules-fedora-30-2017-7-py2
# - env: INSTANCE=modules-opensuse-leap-151-2017-7-py2
# - env: INSTANCE=modules-amazonlinux-1-2017-7-py2
- env: INSTANCE=arch-arch-base-latest-2017-7-py2

## Define the release stage that runs `semantic-release`
- stage: 'release'
Expand Down
3 changes: 3 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ ignore: |
node_modules/
test/**/states/**/*.sls
.kitchen/
test/salt/pillar/modules.sls
test/salt/pillar/default.sls
pillar.example
yaml-files:
# Default settings
Expand Down
1 change: 1 addition & 0 deletions apache/certificates
63 changes: 0 additions & 63 deletions apache/certificates.sls

This file was deleted.

7 changes: 7 additions & 0 deletions apache/clean.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# -*- coding: utf-8 -*-
# vim: ft=sls

include:
- .service.clean
- .config.clean
- .package.clean
140 changes: 0 additions & 140 deletions apache/config.sls

This file was deleted.

52 changes: 52 additions & 0 deletions apache/config/certificates/clean.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# -*- coding: utf-8 -*-
# vim: ft=sls

{%- set tplroot = tpldir.split('/')[0] %}
{%- set sls_service_running = tplroot ~ '.service.running' %}
{%- from tplroot ~ "/map.jinja" import apache with context %}
include:
- {{ sls_service_running }}
{%- for site, cert in salt['pillar.get']('apache:sites', {}).items() %}
{%- if cert.SSLCertificateKeyFile is defined %}
apache_cert_config_clean_{{ site }}_key_file:
file.absent:
- name: {{ cert.SSLCertificateKeyFile }}
- watch_in:
- module: apache-service-running-reload
- require_in:
- module: apache-service-running-restart
- module: apache-service-running-reload
- service: apache-service-running
{%- endif %}
{%- if cert.SSLCertificateFile is defined %}
apache_cert_config_clean_{{ site }}_cert_file:
file.absent:
- name: {{ cert.SSLCertificateFile }}
- watch_in:
- module: apache-service-running-reload
- require_in:
- module: apache-service-running-restart
- module: apache-service-running-reload
- service: apache-service-running
{%- endif %}
{%- if cert.SSLCertificateChainFile is defined %}
apache_cert_config_clean_{{ site }}_bundle_file:
file.managed:
- name: {{ cert.SSLCertificateChainFile }}
- watch_in:
- module: apache-service-running-reload
- require_in:
- module: apache-service-running-restart
- module: apache-service-running-reload
- service: apache-service-running
{%- endif %}
{%- endfor %}
5 changes: 5 additions & 0 deletions apache/config/certificates/init.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# vim: ft=sls

include:
- .install
Loading

0 comments on commit 61d3646

Please sign in to comment.