Skip to content

Commit

Permalink
Add default cloud users to cloud-init (#224)
Browse files Browse the repository at this point in the history
Signed-off-by: Vatsal Parekh <[email protected]>
  • Loading branch information
Vatsal Parekh authored Sep 29, 2020
1 parent 3fe4c47 commit c33c611
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions generate-templates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
icon: rhel
oslabels: "{{ rhel8_labels }}"
osinfoname: "{{ oslabels[0] }}"
cloudusername: cloud-user

- name: Load RHEL 7 versions
set_fact:
Expand Down Expand Up @@ -61,6 +62,7 @@
icon: rhel
oslabels: "{{ rhel7_labels }}"
osinfoname: "{{ oslabels[0] }}"
cloudusername: cloud-user

- name: Load RHEL 6 versions
set_fact:
Expand All @@ -84,6 +86,7 @@
icon: rhel
oslabels: "{{ rhel6_labels }}"
osinfoname: "{{ oslabels[0] }}"
cloudusername: cloud-user

- name: Generate CentOS 8 templates
template:
Expand All @@ -104,6 +107,7 @@
oslabels:
- centos8
osinfoname: "{{ oslabels[0] }}"
cloudusername: centos

- name: Generate CentOS 7 templates
template:
Expand All @@ -124,6 +128,7 @@
oslabels:
- centos7.0
osinfoname: "{{ oslabels[0] }}"
cloudusername: centos

- name: Load CentOS 6 versions
set_fact:
Expand All @@ -143,6 +148,7 @@
icon: centos
oslabels: "{{ centos6_labels }}"
osinfoname: "{{ oslabels[0] }}"
cloudusername: centos

- name: Load Fedora versions
set_fact:
Expand Down Expand Up @@ -170,6 +176,7 @@
icon: fedora
oslabels: "{{ fedora_labels }}"
osinfoname: "{{ oslabels[0] }}"
cloudusername: fedora

- name: Generate OpenSUSE templates
template:
Expand All @@ -186,6 +193,7 @@
oslabels:
- opensuse15.0
osinfoname: "{{ oslabels[0] }}"
cloudusername: opensuse

- name: Generate Ubuntu templates
template:
Expand All @@ -203,6 +211,7 @@
oslabels:
- ubuntu18.04
osinfoname: "{{ oslabels[0] }}"
cloudusername: ubuntu

- name: Generate Windows server templates
template:
Expand Down
1 change: 1 addition & 0 deletions templates/_linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ objects:
- cloudInitNoCloud:
userData: |-
#cloud-config
user: {{ cloudusername }}
password: ${CLOUD_USER_PASSWORD}
chpasswd: { expire: False }
name: cloudinitdisk
Expand Down

0 comments on commit c33c611

Please sign in to comment.