tlu/salt/states/tlu-harvester/files/manifests/cloudinit.yaml

31 lines
917 B
YAML
Raw Permalink Normal View History

2021-10-26 13:34:18 +00:00
{% 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