Merge pull request 'Linting' (#33) from linting into production
All checks were successful
ci/lysergic/push/pipeline Pipeline was successful

Reviewed-on: #33
This commit is contained in:
Georg Pfuetzenreuter 2023-02-15 23:22:08 +01:00
commit 51da14de69
8 changed files with 28 additions and 12 deletions

View File

@ -1,9 +1,22 @@
---
# yamllint disable rule:line-length
skip_clone: true skip_clone: true
pipeline: pipeline:
lint:
image: registry.opensuse.org/home/crameleon/libertacasa/containers/containerfile/libertacasa/pipeline-lint:latest
secrets: [ci_netrc_username, ci_netrc_password, ci_netrc_machine]
when:
event: [push]
commands:
- git clone --single-branch -b $CI_COMMIT_BRANCH $CI_REPO_LINK ../salt-libertacasa-linting
- cd ../salt-libertacasa-linting
- find . -type f \( -name '*.yaml' -o -name '*.yml' \) -exec yamllint -f colored -s {} +
- find . -name '*.sls' -exec salt-lint --severity -x 204 {} +
check: check:
image: registry.opensuse.org/home/crameleon/libertacasa/containers/containerfile/libertacasa/pipeline:latest image: registry.opensuse.org/home/crameleon/libertacasa/containers/containerfile/libertacasa/pipeline:latest
secrets: [ ci_netrc_username, ci_netrc_password, ci_netrc_machine ] secrets: [ci_netrc_username, ci_netrc_password, ci_netrc_machine]
when: when:
event: [push] event: [push]
commands: commands:
@ -29,5 +42,5 @@ pipeline:
event: [push] event: [push]
instance: woodpecker-orpheus.intranet.squirrelcube.com instance: woodpecker-orpheus.intranet.squirrelcube.com
commands: commands:
#- rolesyncer # - rolesyncer
- bin/rolesyncer.py - bin/rolesyncer.py

View File

@ -1,3 +1,4 @@
---
- firewalld - firewalld
- keepalived - keepalived
- nginx - nginx

View File

@ -46,7 +46,7 @@ matterbridge_{{ instance }}_mediadir:
- user: matterbridge - user: matterbridge
{#- to-do: implement some shared group #} {#- to-do: implement some shared group #}
- group: lighttpd - group: lighttpd
- mode: 750 - mode: '0750'
- makedirs: True - makedirs: True
{%- endif %} {%- endif %}

View File

@ -5,6 +5,6 @@ include:
file.managed: file.managed:
- user: keepalived_script - user: keepalived_script
- group: wheel - group: wheel
- mode: 750 - mode: '0750'
- template: jinja - template: jinja
- source: salt://{{ slspath }}/files/failover.sh.j2 - source: salt://{{ slspath }}/files/failover.sh.j2

View File

@ -17,7 +17,7 @@ salt_master_extension_modules_dirs:
{%- endfor %} {%- endfor %}
- user: root - user: root
- group: salt - group: salt
- mode: 0755 - mode: '0755'
salt_master_extension_modules_bins: salt_master_extension_modules_bins:
file.managed: file.managed:
@ -30,7 +30,7 @@ salt_master_extension_modules_bins:
{%- endfor %} {%- endfor %}
- user: root - user: root
- group: salt - group: salt
- mode: 0640 - mode: '0640'
- require: - require:
- file: salt_master_extension_modules_dirs - file: salt_master_extension_modules_dirs
@ -72,7 +72,7 @@ salt_master_extra_packages:
- requirepass {{ master_pillar['cache.redis.password'] }} - requirepass {{ master_pillar['cache.redis.password'] }}
- user: root - user: root
- group: redis - group: redis
- mode: 0640 - mode: '0640'
- require: - require:
- pkg: redis - pkg: redis
@ -80,7 +80,7 @@ salt_master_extra_packages:
file.directory: file.directory:
- user: redis - user: redis
- group: redis - group: redis
- mode: 0750 - mode: '0750'
- require: - require:
- pkg: redis - pkg: redis

View File

@ -1,5 +1,7 @@
{%- set netbox_pillar = salt['pillar.get']('netbox') -%} {%- set netbox_pillar = salt['pillar.get']('netbox') -%}
{%- if 'custom_fields' in netbox_pillar and netbox_pillar['custom_fields']['salt_roles'] is not none and 'salt.syndic' in netbox_pillar['custom_fields']['salt_roles'] -%} {%- if 'custom_fields' in netbox_pillar
and netbox_pillar['custom_fields']['salt_roles'] is not none
and 'salt.syndic' in netbox_pillar['custom_fields']['salt_roles'] -%}
{%- set master = salt['pillar.get']('salt:master:syndic_master') -%} {%- set master = salt['pillar.get']('salt:master:syndic_master') -%}
{%- elif 'config_context' in netbox_pillar -%} {%- elif 'config_context' in netbox_pillar -%}
{%- set master = netbox_pillar['config_context']['salt_master'] -%} {%- set master = netbox_pillar['config_context']['salt_master'] -%}