Skip to content

Commit

Permalink
refactor(sls): align to template-formula: use tplroot
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperTux88 committed Oct 20, 2020
1 parent 848c573 commit a3a19f5
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 9 deletions.
7 changes: 6 additions & 1 deletion diaspora/config.sls
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{%- from "diaspora/map.jinja" import diaspora with context %}
# -*- coding: utf-8 -*-
# vim: ft=sls

{#- Get the `tplroot` from `tpldir` #}
{%- set tplroot = tpldir.split('/')[0] %}
{%- from tplroot ~ "/map.jinja" import diaspora with context %}
{{ diaspora.install_path }}/config/database.yml:
file.managed:
Expand Down
6 changes: 3 additions & 3 deletions diaspora/init.sls
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include:
- diaspora.install
- diaspora.config
- diaspora.service
- .install
- .config
- .service
9 changes: 7 additions & 2 deletions diaspora/install.sls
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{%- from "diaspora/map.jinja" import diaspora with context %}
# -*- coding: utf-8 -*-
# vim: ft=sls

{#- Get the `tplroot` from `tpldir` #}
{%- set tplroot = tpldir.split('/')[0] %}
{%- from tplroot ~ "/map.jinja" import diaspora with context %}
{%- set environment = diaspora.configuration.server.rails_environment %}
include:
- diaspora.config
- {{ tplroot }}.config
{%- if grains.os == 'CentOS' and grains.osmajorrelease >= 8 %}
diaspora_centos_enable_powertools_repo:
Expand Down
11 changes: 8 additions & 3 deletions diaspora/service.sls
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{%- from "diaspora/map.jinja" import diaspora with context %}
# -*- coding: utf-8 -*-
# vim: ft=sls

{#- Get the `tplroot` from `tpldir` #}
{%- set tplroot = tpldir.split('/')[0] %}
{%- from tplroot ~ "/map.jinja" import diaspora with context %}
include:
- diaspora.install
- diaspora.config
- {{ tplroot }}.install
- {{ tplroot }}.config
/etc/systemd/system/diaspora-sidekiq.service:
file.managed:
Expand Down

0 comments on commit a3a19f5

Please sign in to comment.