add provider for different server
This commit is contained in:
parent
0cab627154
commit
9dd32d022d
22 changed files with 77 additions and 2 deletions
|
@ -24,6 +24,11 @@
|
|||
</family>
|
||||
</variables>
|
||||
<constraints>
|
||||
<fill name="get_provider_name">
|
||||
<param type="variable">zone_name_eth0</param>
|
||||
<param>LocalDNS</param>
|
||||
<target>dns_client_address</target>
|
||||
</fill>
|
||||
<fill name="set_linked">
|
||||
<param name="linked_server" type="variable">dns_client_address</param>
|
||||
<param name="linked_provider">dns</param>
|
||||
|
|
|
@ -7,7 +7,7 @@ from os.path import dirname as _dirname, abspath as _abspath, join as _join, isf
|
|||
from os import makedirs as _makedirs
|
||||
|
||||
|
||||
from risotto.utils import load_domains, DOMAINS
|
||||
from risotto.utils import load_domains, DOMAINS, ZONES_SERVER
|
||||
|
||||
|
||||
_HERE = _dirname(_abspath(__main__.__file__))
|
||||
|
@ -111,3 +111,11 @@ def get_ip(server_name: str,
|
|||
host_name, domain_name = server_name.split('.', 1)
|
||||
domain = DOMAINS[domain_name]
|
||||
return domain[1][domain[0].index(host_name)]
|
||||
|
||||
|
||||
def get_provider_name(network_name: str,
|
||||
provider: str,
|
||||
) -> str:
|
||||
if network_name not in ZONES_SERVER['providers'] or provider not in ZONES_SERVER['providers'][network_name]:
|
||||
return
|
||||
return ZONES_SERVER['providers'][network_name][provider][0]
|
||||
|
|
|
@ -38,6 +38,11 @@
|
|||
<check name='valid_base_dn'>
|
||||
<target>ldapclient_base_dn</target>
|
||||
</check>
|
||||
<fill name="get_provider_name">
|
||||
<param type="variable">zone_name_eth0</param>
|
||||
<param>LDAP</param>
|
||||
<target>ldap_server_address</target>
|
||||
</fill>
|
||||
<fill name="calc_value">
|
||||
<param type="variable">tls_ca_directory</param>
|
||||
<param>ca_LDAP.crt</param>
|
||||
|
|
|
@ -6,3 +6,4 @@ depends:
|
|||
- reverse-proxy-client
|
||||
- relay-mail-client
|
||||
- nginx-common
|
||||
provider: OAuth2
|
||||
|
|
|
@ -12,6 +12,11 @@
|
|||
</family>
|
||||
</variables>
|
||||
<constraints>
|
||||
<fill name="get_provider_name">
|
||||
<param type="variable">zone_name_eth0</param>
|
||||
<param>MariaDB</param>
|
||||
<target>mariadb_client_server_domainname</target>
|
||||
</fill>
|
||||
<fill name="set_linked">
|
||||
<param name="linked_server" type="variable">mariadb_client_server_domainname</param>
|
||||
<param name="linked_provider">clients</param>
|
||||
|
|
|
@ -3,3 +3,4 @@ description: Mariadb
|
|||
depends:
|
||||
- server
|
||||
- base-fedora-35
|
||||
provider: MariaDB
|
||||
|
|
|
@ -3,3 +3,4 @@ description: Nginx as reverse proxy
|
|||
depends:
|
||||
- base-fedora-35
|
||||
- nginx-common
|
||||
provider: ReverseProxy
|
||||
|
|
|
@ -3,3 +3,4 @@ description: Configuration du serveur faisant autorité NSD
|
|||
service: true
|
||||
depends:
|
||||
- base-fedora-35
|
||||
provider: LocalDNS
|
||||
|
|
|
@ -41,6 +41,11 @@
|
|||
<variable name="nsd_reverse_filenames_signed" type="filename" description="Nom des fichiers de zone reverse signé" multi="True" hidden="True"/>
|
||||
</variables>
|
||||
<constraints>
|
||||
<fill name="get_provider_name">
|
||||
<param type="variable">zone_name_eth0</param>
|
||||
<param>ExternalDNS</param>
|
||||
<target>nsd_resolver</target>
|
||||
</fill>
|
||||
<fill name="nsd_concat_lists">
|
||||
<param type="variable">ip_eth</param>
|
||||
<param type="variable">nsd_allowed_client</param>
|
||||
|
|
|
@ -32,6 +32,11 @@
|
|||
</family>
|
||||
</variables>
|
||||
<constraints>
|
||||
<fill name="get_provider_name">
|
||||
<param type="variable">zone_name_eth0</param>
|
||||
<param>OAuth2</param>
|
||||
<target>oauth2_client_server_domainname</target>
|
||||
</fill>
|
||||
<fill name="set_linked">
|
||||
<param name="linked_server" type="variable">oauth2_client_server_domainname</param>
|
||||
<param name="linked_provider">oauth2</param>
|
||||
|
|
|
@ -3,3 +3,4 @@ description: OpenLDAP server
|
|||
depends:
|
||||
- ldap-client-fedora
|
||||
- base-fedora-35
|
||||
provider: LDAP
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
<family name="network">
|
||||
<variable name="dns_client_address" redefine="True"/>
|
||||
</family>
|
||||
<family name="peertube">
|
||||
<variable name="peertube_admin_email" type="mail" description="Adresse courriel de l'administrateur Peertube" mandatory="True"/>
|
||||
<variable name="peertube_short_description" type="string" description="Description courte de l'instance">
|
||||
|
@ -52,6 +55,11 @@
|
|||
</family>
|
||||
</variables>
|
||||
<constraints>
|
||||
<fill name="get_provider_name">
|
||||
<param type="variable">zone_name_eth0</param>
|
||||
<param>ExternalDNS</param>
|
||||
<target>dns_client_address</target>
|
||||
</fill>
|
||||
<fill name="calc_oauth2_client_external">
|
||||
<param type="variable">revprox_client_external_domainnames</param>
|
||||
<param type="variable">revprox_client_location</param>
|
||||
|
|
|
@ -2,3 +2,4 @@ format: '0.1'
|
|||
description: Postfix has relay
|
||||
depends:
|
||||
- base-fedora-35
|
||||
provider: SMTP
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
</services>
|
||||
<variables>
|
||||
<family name="network">
|
||||
<variable name="dns_client_address" redefine="True"/>
|
||||
<variable name="external_ports" redefine="True">
|
||||
<value>25</value>
|
||||
</variable>
|
||||
|
@ -52,6 +53,11 @@
|
|||
</family>
|
||||
</variables>
|
||||
<constraints>
|
||||
<fill name="get_provider_name">
|
||||
<param type="variable">zone_name_eth0</param>
|
||||
<param>ExternalDNS</param>
|
||||
<target>dns_client_address</target>
|
||||
</fill>
|
||||
<fill name="calc_value">
|
||||
<param>/etc/opendkim/keys/</param>
|
||||
<param type="variable">postfix_relay_domains</param>
|
||||
|
|
|
@ -20,6 +20,11 @@
|
|||
</family>
|
||||
</variables>
|
||||
<constraints>
|
||||
<fill name="get_provider_name">
|
||||
<param type="variable">zone_name_eth0</param>
|
||||
<param>Postgresql</param>
|
||||
<target>pg_client_server_domainname</target>
|
||||
</fill>
|
||||
<fill name="set_linked">
|
||||
<param name="linked_server" type="variable">pg_client_server_domainname</param>
|
||||
<param name="linked_provider">clients</param>
|
||||
|
|
|
@ -3,3 +3,4 @@ description: Postgresql
|
|||
depends:
|
||||
- server
|
||||
- base-fedora-35
|
||||
provider: Postgresql
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
format: '0.1'
|
||||
description: Information for Systemd Machined
|
||||
provider: true
|
||||
depends:
|
||||
- systemd
|
||||
|
|
|
@ -19,6 +19,11 @@
|
|||
</family>
|
||||
</variables>
|
||||
<constraints>
|
||||
<fill name="get_provider_name">
|
||||
<param type="variable">zone_name_eth0</param>
|
||||
<param>Redis</param>
|
||||
<target>redis_client_server_domainname</target>
|
||||
</fill>
|
||||
<fill name="set_linked">
|
||||
<param name="linked_server" type="variable">redis_client_server_domainname</param>
|
||||
<param name="linked_provider">redis_client</param>
|
||||
|
|
|
@ -2,3 +2,4 @@ format: '0.1'
|
|||
description: Redis
|
||||
depends:
|
||||
- base-fedora-35
|
||||
provider: Redis
|
||||
|
|
|
@ -13,6 +13,11 @@
|
|||
</family>
|
||||
</variables>
|
||||
<constraints>
|
||||
<fill name="get_provider_name">
|
||||
<param type="variable">zone_name_eth0</param>
|
||||
<param>SMTP</param>
|
||||
<target>smtp_relay_address</target>
|
||||
</fill>
|
||||
<fill name="set_linked">
|
||||
<param name="linked_server" type="variable">smtp_relay_address</param>
|
||||
<param name="linked_provider">mail</param>
|
||||
|
|
|
@ -37,6 +37,11 @@
|
|||
</family>
|
||||
</variables>
|
||||
<constraints>
|
||||
<fill name="get_provider_name">
|
||||
<param type="variable">zone_name_eth0</param>
|
||||
<param>ReverseProxy</param>
|
||||
<target>revprox_client_server_domainname</target>
|
||||
</fill>
|
||||
<fill name="get_first_value">
|
||||
<param type="variable">revprox_client_external_domainnames</param>
|
||||
<target>revprox_client_external_domainname</target>
|
||||
|
|
|
@ -3,3 +3,4 @@ description: Configuration du serveur DNS unbound
|
|||
service: true
|
||||
depends:
|
||||
- base-fedora-35
|
||||
provider: ExternalDNS
|
||||
|
|
Loading…
Reference in a new issue