.
This commit is contained in:
parent
5fe60ef166
commit
a375142569
@ -14,8 +14,8 @@ tlu-harvester:
|
||||
images:
|
||||
opensuse:
|
||||
- name: openSUSE Leap 15.3
|
||||
url: https://download.opensuse.org/distribution/leap/15.3/appliances/openSUSE-Leap-15.3-JeOS.x86_64-kvm-and-xen.qcow2
|
||||
checksum: da11e3ed78cdadb0c8a15e9dd82c3c2b2746ba61cb98c3c03cfb156e5b8adb10
|
||||
url: https://download.opensuse.org/distribution/leap/15.3/appliances/openSUSE-Leap-15.3-JeOS.x86_64-OpenStack-Cloud.qcow2
|
||||
checksum: 7207cce5b77d9d040610c39cd3d09437489797882b1b834acfb8b0f9d82be26c
|
||||
ns: default
|
||||
- name: openSUSE MicroOS
|
||||
url: https://download.opensuse.org/tumbleweed/appliances/openSUSE-MicroOS.x86_64-kvm-and-xen.qcow2
|
||||
|
30
salt/states/tlu-harvester/files/manifests/cloudinit.yaml
Normal file
30
salt/states/tlu-harvester/files/manifests/cloudinit.yaml
Normal file
@ -0,0 +1,30 @@
|
||||
{% set fqdn = "rmt." + pillar['network']['domain'] -%}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
labels:
|
||||
harvesterhci.io/cloud-init-template: user
|
||||
harvesterhci.io/creator: ""
|
||||
name: rmt-client-register
|
||||
namespace: default
|
||||
data:
|
||||
cloudInit: |-
|
||||
runcmd:
|
||||
- [ bash, "-c", "type SUSEConnect >/dev/null 2>&1 || { sudo zypper --non-interactive install SUSEConnect; }" ]
|
||||
- [ curl, -O, "http://{{ fqdn }}/tools/rmt-client-setup" ]
|
||||
- [ sudo, sh, rmt-client-setup, --host, {{ fqdn }}, --yes, --regcert, "http://{{ fqdn }}/rmt.crt", --fingerprint, "{{ fingerprint }}" ]
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
labels:
|
||||
harvesterhci.io/cloud-init-template: user
|
||||
harvesterhci.io/creator: ""
|
||||
name: password-config-default-user
|
||||
namespace: default
|
||||
data:
|
||||
cloudInit: |-
|
||||
password: {{ pillar['tlu-harvester']['password'] }}
|
||||
chpasswd: { expire: False }
|
||||
ssh_pwauth: True
|
@ -9,6 +9,8 @@ Add tlu-harvester manifests:
|
||||
- include_empty: True
|
||||
- makedirs: True
|
||||
- dir_modes: "0700"
|
||||
- context:
|
||||
fingerprint: {{ salt['cmd.shell']('/usr/bin/openssl x509 -in /etc/rmt/ssl/rmt-ca.crt -noout -fingerprint | /usr/bin/cut -d= -f2') }}
|
||||
|
||||
{%- set images = salt['file.find']('/srv/www/htdocs/images/suse',type='f',mindepth=1,maxdepth=1,print='name') %}
|
||||
Adding image manifest for SUSE images:
|
||||
|
Loading…
Reference in New Issue
Block a user