add undisable attribut to service

This commit is contained in:
2021-11-26 22:46:34 +01:00
parent a1c3b2b19c
commit d41a879ed9
10 changed files with 81 additions and 1 deletions

View File

@ -54,6 +54,7 @@
<!ATTLIST service engine (none|creole|jinja2) #IMPLIED>
<!ATTLIST service target CDATA #IMPLIED>
<!ATTLIST service type (service|mount|swap) "service">
<!ATTLIST service undisable (True|False) "False">
<!ELEMENT ip (#PCDATA)>
<!ATTLIST ip iplist CDATA #IMPLIED>

View File

@ -343,7 +343,7 @@ class RougailBaseTemplate:
service_name = await service_obj.option.description()
service_type = await service_obj.information.get('type', 'service')
if await service_obj.option('activate').value.get() is False:
if included is False:
if included is False and not await service_obj.information.get('undisable', False):
self.desactive_service(service_name, service_type)
continue
if not included: