aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-01-10 21:48:14 +0000
committerGerrit Code Review <review@openstack.org>2017-01-10 21:48:14 +0000
commita70e6a15c4b8eeec511ba3c836e9ba9c285fd431 (patch)
tree29bcfc449d3584217cf8a21db45462b913a17774
parent40561a3ad33c56e594908374f1d130a641294c5f (diff)
parent724ba3a32f20349ed20093758a48ca1297a0534e (diff)
Merge "Add example showing how to set root password via cloud-init"
-rw-r--r--firstboot/userdata_root_password.yaml38
1 files changed, 38 insertions, 0 deletions
diff --git a/firstboot/userdata_root_password.yaml b/firstboot/userdata_root_password.yaml
new file mode 100644
index 00000000..63dd5a9c
--- /dev/null
+++ b/firstboot/userdata_root_password.yaml
@@ -0,0 +1,38 @@
+heat_template_version: ocata
+
+description: >
+ Uses cloud-init to enable root logins and set the root password.
+ Note this is less secure than the default configuration and may not be
+ appropriate for production environments, it's intended for illustration
+ and development/debugging only.
+
+parameters:
+ NodeRootPassword:
+ description: Root password for the nodes
+ hidden: true
+ type: string
+
+resources:
+ userdata:
+ type: OS::Heat::MultipartMime
+ properties:
+ parts:
+ - config: {get_resource: root_config}
+
+ root_config:
+ type: OS::Heat::CloudConfig
+ properties:
+ cloud_config:
+ ssh_pwauth: true
+ disable_root: false
+ chpasswd:
+ list:
+ str_replace:
+ template: "root:PASSWORD"
+ params:
+ PASSWORD: {get_param: NodeRootPassword}
+ expire: False
+
+outputs:
+ OS::stack_id:
+ value: {get_resource: userdata}