Commit f9db6737 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

software/kvm: support OS where 'python' command is not existing

This is the case in debian 11 when we don't have python2 installed.
parent b696fd3d
Pipeline #23392 failed with stage
in 0 seconds
...@@ -15,11 +15,11 @@ ...@@ -15,11 +15,11 @@
[template] [template]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 7e90da1f6dac4233e1aa3248f48e357c md5sum = a7978940fb9cdcc4e1ec33015ba640ba
[template-kvm] [template-kvm]
filename = instance-kvm.cfg.jinja2 filename = instance-kvm.cfg.jinja2
md5sum = ff9fb2378a48d1ca8c72f6a87d3a0221 md5sum = 150285957daa256420d2d73519277420
[template-kvm-cluster] [template-kvm-cluster]
filename = instance-kvm-cluster.cfg.jinja2.in filename = instance-kvm-cluster.cfg.jinja2.in
...@@ -51,7 +51,7 @@ md5sum = e041e8011ad2ec7f104be173ef76f5e9 ...@@ -51,7 +51,7 @@ md5sum = e041e8011ad2ec7f104be173ef76f5e9
[template-ansible-promise] [template-ansible-promise]
filename = template/ansible-promise.in filename = template/ansible-promise.in
md5sum = a8cf453d20f01c707f02c4b4014580d8 md5sum = 6328f99728284847b8dd1146aadeae1b
[template-kvm-run] [template-kvm-run]
filename = template/template-kvm-run.in filename = template/template-kvm-run.in
...@@ -78,16 +78,16 @@ filename = instance-kvm-http.cfg.in ...@@ -78,16 +78,16 @@ filename = instance-kvm-http.cfg.in
md5sum = 438192aab9f11e40dc521b46a4854dcf md5sum = 438192aab9f11e40dc521b46a4854dcf
[image-download-controller] [image-download-controller]
filename = template/image-download-controller.py filename = template/image-download-controller.py.in
md5sum = 3cc10323fd4d2db4cfbac536b66eae7c md5sum = dc822ddd7dc987bf808a64a18ba11fd0
[image-download-config-creator] [image-download-config-creator]
filename = template/image-download-config-creator.py filename = template/image-download-config-creator.py.in
md5sum = 22ed19d9b8f7b983c97c52caa686bcd7 md5sum = b74b9d4829fe2c2f7122125cf87d29cd
[whitelist-firewall-download-controller] [whitelist-firewall-download-controller]
filename = template/whitelist-firewall-download-controller.py filename = template/whitelist-firewall-download-controller.py.in
md5sum = bc64e29546833817636261d1b28aa6dc md5sum = b4f6ffef08685bace1b9c01a3bd2620d
[whitelist-domains-default] [whitelist-domains-default]
filename = template/whitelist-domains-default filename = template/whitelist-domains-default
......
...@@ -1026,6 +1026,7 @@ extensions = jinja2.ext.do ...@@ -1026,6 +1026,7 @@ extensions = jinja2.ext.do
context = context =
raw logs ${directory:public}/ansible raw logs ${directory:public}/ansible
raw name {{ name }} raw name {{ name }}
raw python_executable ${buildout:executable}
[ansible-vm-promise] [ansible-vm-promise]
<= monitor-promise-base <= monitor-promise-base
......
...@@ -83,9 +83,9 @@ extra-context = ...@@ -83,9 +83,9 @@ extra-context =
raw dcron_executable_location ${dcron:location}/sbin/crond raw dcron_executable_location ${dcron:location}/sbin/crond
raw debian_amd64_netinst_location ${debian-amd64-bullseye-netinst.iso:target} raw debian_amd64_netinst_location ${debian-amd64-bullseye-netinst.iso:target}
raw whitelist_domains_default ${whitelist-domains-default:target} raw whitelist_domains_default ${whitelist-domains-default:target}
raw whitelist_firewall_download_controller ${whitelist-firewall-download-controller:target} raw whitelist_firewall_download_controller ${whitelist-firewall-download-controller:output}
raw image_download_controller ${image-download-controller:target} raw image_download_controller ${image-download-controller:output}
raw image_download_config_creator ${image-download-config-creator:target} raw image_download_config_creator ${image-download-config-creator:output}
raw logrotate_cfg ${template-logrotate-base:output} raw logrotate_cfg ${template-logrotate-base:output}
raw novnc_location ${noVNC:location} raw novnc_location ${noVNC:location}
raw netcat_bin ${netcat:location}/bin/netcat raw netcat_bin ${netcat:location}/bin/netcat
......
...@@ -61,9 +61,16 @@ scripts = ...@@ -61,9 +61,16 @@ scripts =
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
[template] [template-base]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
[template-base-python]
<= template-base
output = ${buildout:parts-directory}/${:_buildout_section_name_}/${:_buildout_section_name_}.py
[template]
<= template-base
output = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
[template-kvm] [template-kvm]
...@@ -118,13 +125,13 @@ context = ...@@ -118,13 +125,13 @@ context =
key template_apache_conf template-apache-conf:target key template_apache_conf template-apache-conf:target
[image-download-controller] [image-download-controller]
<= download-base <= template-base-python
[image-download-config-creator] [image-download-config-creator]
<= download-base <= template-base-python
[whitelist-firewall-download-controller] [whitelist-firewall-download-controller]
<= download-base <= template-base-python
[whitelist-domains-default] [whitelist-domains-default]
<= download-base <= download-base
......
#!/usr/bin/env python #!{{ python_executable }}
# Parse Ansible result log file and define if execution succeed or not # Parse Ansible result log file and define if execution succeed or not
......
#!/usr/bin/env python #!${buildout:executable}
import hashlib import hashlib
import json import json
......
#!/usr/bin/env python #!${buildout:executable}
import hashlib import hashlib
import json import json
......
#!/usr/bin/env python #!${buildout:executable}
import os import os
import subprocess import subprocess
......
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