Configuring Cloud-Init 17.1
- Add the key-value pair no_ssh_fingerprints: true and ensure that it has a blank row before and after it.
no_ssh_fingerprints: true
- Change the value of users to default.
users: - default - Change the value of disable_root to true. This parameter specifies whether remote login over SSH as user root is enabled.
disable_root: true
- Add ssh_pwauth: false or ssh_pwauth: 0. This parameter specifies whether remote login over SSH as user root is enabled.
ssh_pwauth: false
- Add the following content:
network: config: disabled datasource_list: [ OpenStack ]
For Ubuntu 16.04, do not add the following information:
datasource_list: [ OpenStack ]
- Add the following content after - final-message in cloud_final_modules:
- power-state-change
- Modify the content under system info as follows:
system_info: distro: sles default_user: name: linux //Username for logging in to the OS lock_passwd: True //True indicates that password login is disabled. In some OSs, 1 indicates that password login is disabled. gecos: redhat groups: [adm, audio, cdrom, dialout, dip, floppy, lxd, netdev, plugdev, sudo, video] //(Optional) This parameter specifies the groups to which the user is added. The value must contain groups that exist in the etc/group of the OS. sudo: ["ALL=(ALL) NOPASSWD:ALL"] //The user has all permissions of user root. shell: /bin/bash //The bash command is used to execute the shell script. paths: cloud_dir: /var/lib/cloud/ templates_dir: /etc/cloud/templates/ ssh_svcname: sshdThe value of distro varies depending on the OS and can be sles, rhel, ubuntu, debian, or fedora.
- (Optional) For SUSE 12 SP1 and SUSE 12 SP2, run the following command to modify configuration item [Unit] in the /usr/lib/systemd/system/cloud-init-local.service configuration file:
vi /usr/lib/systemd/system/cloud-init-local.service
Ensure that the value of [Unit] is the same as the following:
[Unit] Description=Initial cloud-init job (pre-networking) DefaultDependencies=no Wants=network-pre.target Wants=local-fs.target After=local-fs.target Before=network-pre.target Before=shutdown.target Before=basic.target Conflicts=shutdown.target # Other distros use Before=sysinit.target. There is not a clearly identified # reason for usage of basic.target instead.
- (Optional) For Ubuntu 16.04, run the following command to configure the OpenStack source:

Run the vim /etc/cloud/cloud.cfg.d/90_dpkg.cfg command to open the configuration file and check the configuration items.
# to update this file, run dpkg-reconfigure cloud-init datasource_list: [ OpenStack ] ~ ~ ~
If the preceding information is displayed, the configuration is successful.
Last Article: Configuring Cloud-Init 0.7.9
Next Article: Configuring Cloud-Init 18.2
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.