{% load i18n %}
hostname
- vm hostname" %}sysuser
- vm system default user (cloud)" %}password
- default user password (use 'hash' filter to convert sha512)" %}owner
- vm owner django username" %}acl.allusers
- get all associated user's username to vm (list)" %}acl.operators
- get all associated operator level user's username to vm (list)" %}acl.users
- get all associated user level user's username to vm (list)" %}net.ipv4
- default host ip address" %}net.ipv6
- default host ipv6 address" %}net.vlans
- associated vlans: list of objects (name: vlan name, ipv4/ipv6: host ip in vlan)" %}ssh.keys
- owner's ssh-keys dictionary: the key is the ssh-key's name" %}ci.rndstr(len: int)
- function: make random string with 'len' charachters lenght" %}{% trans "Filters: hash - sha512 hash method" %}
Example:{% verbatim %} #cloud-config users: - default - name: {{sysuser}} sudo: ['ALL=(ALL) NOPASSWD:ALL'] groups: sudo shell: /bin/bash ssh_pwauth: True chpasswd: { expire: False } lock-passwd: false passwd: "{{ password | hash }}" ssh_authorized_keys: - {{ ssh.keys['my-key'] }} {% for u in acl.operators %} - name: {{i}} shell: /bin/bash {% endfor %} {% endverbatim %}