Skip to content
项目

关于

Freifunk München Salt-Stack states

系统与基础设施

这些数字如何统计

33 星标13 复刻 +1 24小时

实测星标增长

24小时
+1
7天
+1
15天
+1
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

FFMUC-SALT-PUBLIC Repo

This is the salt repo for Freifunk Munich

Dependencies

This repo makes heavy use of Netbox based ext-pillar information especially config_contexts, services and ip information

Netbox is a hard dependency at render time: _modules/site_prefixes.py, _modules/extra_dns_entries.py and _modules/cfssl_certs.py are called from Jinja while states are being rendered. They fail closed - if Netbox cannot be reached the render aborts and the highstate goes red, rather than quietly producing a config with no prefixes or no DNS records.

Sample config_context

{
    "docker": {
        "cfssl": {
            "container_dir": "/srv/docker/cfssl",
            "credentials": {
                "db_password": "password"
            },
            "mounts": [
                "/srv/docker/postgresql-cfssl/data",
                "/srv/docker/cfssl/data",
                "/srv/docker/postgresql-cfssl/data"
            ]
        },
        "openldap": {
            "container_dir": "/srv/docker/openldap",
            "credentials": {
                "admin_user": "password",
                "readonly_user": "password"
            },
            "mounts": [
                "/srv/docker/openldap/data",
                "/srv/docker/openldap/config",
                "/srv/docker/openldap/certs"
            ]
        }
    },
    "roles": [
        "backup_client",
        "icinga2_client"
    ],
    "ssh_host_key": {
        "ssh_host_ecdsa_key": "",
        "ssh_host_ecdsa_key.pub": "",
        "ssh_host_ed25519_key": "",
        "ssh_host_ed25519_key.pub": "",
        "ssh_host_rsa_key": "",
        "ssh_host_rsa_key.pub": ""
    },
    "ssh_user_keys": {
        "admins": {
            "admin1": "ssh-rsa key-data"
        },
        "system_users": {},
        "users": {}
    },
    "user_home": {}
}

Linting

CI runs black, yamllint, salt-lint and shellcheck. To run them locally:

black --check --diff .
yamllint -c .yamllint .
salt-lint -x 204,205 $(find . -name '*.sls' -o -name '*.jinja' -o -name '*.j2' -o -name '*.tmpl')
shellcheck $(grep -rl '^#!.*sh' --include='*.sh' .)

License

This repository is licensed under the GNU General Public License v3.0 or later (GPL-3.0-or-later). See LICENSE.

These parts have a different license:

The FFMUC logos and branding images are not covered by these licenses.

探索相关项目

加载中…