Question

Trying to figure out how to use this deployment cloud-config on ubuntu 14.10

  • Posted November 4, 2014

Like the title says, for some reason this cloud config doesn’t finish… It creates the user with the right keys the run_cmd doesnt finish nor does the group creation… What am I missing?

Also how do you specify passwd: the doc’s state a password hash but i’m really not sure how to generate such a thing for a linux system.

#cloud-config
users:
  - name: alpha
    groups: sudo
    shell: /bin/zsh
    sudo: ['ALL=(ALL) NOPASSWD:ALL']
    ssh-authorized-keys:
      - key1goeshere
groups:
  - npm: [alpha]
packages:
  - git
  - vim
  - zsh
  - htop
run_cmd:
  - curl -sL https://deb.nodesource.com/setup | sudo bash -
  - apt-get install nodejs -y
  - npm set prefix /usr/local
  - chown -R /usr/lib/node/* /usr/local/bin /usr/local/lib
  - chmod -R 2775 /usr/local/lib /usr/local/bin /usr/lib/node/*
Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

The commands do not run as the module should be runcmd not run_cmd One thing that has personally frustrated me when working with cloud-config files is that they are a bit inconsistent about naming.

As for the passwd, it takes a SHA-512 password hash. On a Unix system, you can generate that using:

mkpasswd --method=SHA-512 --rounds=4096