Commit ddf184ac authored by Matthieu Lamalle's avatar Matthieu Lamalle
Browse files

Add creolefuncs

parent d5c5574e
......@@ -67,7 +67,7 @@ RUN curl https://repo.saltstack.com/apt/ubuntu/18.04/amd64/latest/SALTSTACK-GPG-
ENV EOLE_FORMULA_DIR=/srv/formulas
ENV EOLE_CONFIGURATION_FORMULA_URL="https://dev-eole.ac-dijon.fr/git/eole-configuration-formula.git"
ENV EOLE_CONFIGURATION_FORMULA_REF=8c08f4fb902408e320ea1fa2fd74e12fdab60fa3
ENV EOLE_CONFIGURATION_FORMULA_REF=0a9f42bc90ec10631f9c58289bc990633654ab10
RUN git clone "${EOLE_CONFIGURATION_FORMULA_URL}" "${EOLE_FORMULA_DIR}/eole-configuration-formula" \
&& cd "${EOLE_FORMULA_DIR}/eole-configuration-formula" \
......
......@@ -148,8 +148,7 @@ class SaltRunner(ZephirCommonController):
async def download_configuration_files(self,
server_id):
minion_dir = '{0}/{1}'.format(MINION_DIR, server_id)
schema_file_path = '{0}/config.schema'.format(minion_dir)
config_file_path = '{0}/config.values'.format(minion_dir)
creolefuncs_file_path = '{0}/config.creolefuncs'.format(minion_dir)
pillar_file_path = '/srv/pillar/pillars_{0}.sls'.format(server_id)
makedirs(minion_dir, exist_ok=True)
......@@ -159,9 +158,6 @@ class SaltRunner(ZephirCommonController):
servermodel_id = server['servermodelid']
with open(config_file_path, 'w') as fh:
fh.write(server['configuration'])
with open(pillar_file_path, 'w') as fh:
if server['configuration']:
yaml.dump(json.loads(server['configuration']), fh, allow_unicode=True)
......@@ -174,11 +170,11 @@ class SaltRunner(ZephirCommonController):
servermodelid=servermodel_id,
inheritance=False,
resolvdepends=False,
schema=True,
creolefuncs=True,
probes=True)
with open(schema_file_path, 'w') as fh:
fh.write(servermodel['schema'])
with open(creolefuncs_file_path, 'w') as fh:
fh.write(servermodel['creolefuncs'])
self._download_env(server_id, servermodel)
def _download_env(self, server_id, servermodel):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment