| Dmitry Tyzhnenko | 80ce020 | 2019-02-07 13:27:19 +0200 | [diff] [blame^] | 1 | #cloud-config, see http://cloudinit.readthedocs.io/en/latest/topics/examples.html | 
 | 2 |  | 
 | 3 | vendor_data: | 
 | 4 |     enabled: True | 
 | 5 |  | 
 | 6 | ssh_pwauth: True | 
 | 7 | users: | 
 | 8 |   - name: root | 
 | 9 |     sudo: ALL=(ALL) NOPASSWD:ALL | 
 | 10 |     shell: /bin/bash | 
 | 11 |     ssh_pwauth: True | 
 | 12 |  | 
 | 13 |  | 
 | 14 | disable_root: false | 
 | 15 | chpasswd: | 
 | 16 |   list: | | 
 | 17 |     root:r00tme | 
 | 18 |   expire: False | 
 | 19 |  | 
 | 20 | bootcmd: | 
 | 21 |  # Block access to SSH while node is preparing | 
 | 22 |  # - cloud-init-per once sudo echo 'sshd:ALL' >> /etc/hosts.deny | 
 | 23 |  # Enable root access | 
 | 24 |  - touch /is_cloud_init_started | 
 | 25 |  - sed -i -e '/^PermitRootLogin/s/^.*$/PermitRootLogin yes/' /etc/ssh/sshd_config | 
 | 26 |  - service sshd restart | 
 | 27 |  | 
 | 28 | merge_how: "dict(recurse_array)+list(append)" |