Score:1

Cloud Init not working on Vultr

jp flag

I am new with Cloud-Init, I am trying to install tailscale and Docker with it, and some other packages

I tried several times and no luck and no error logs.

What I am doing wrong?

Here is my script:

#cloud-config

users:
    - name: ubuntu
        shell: /usr/bin/bash
        ssh_import_id: gh:skhaz
        sudo: ALL=(ALL:ALL) NOPASSWD:ALL

chpasswd:
    expire: false

apt_upgrade: true

apt:
    sources:
        docker
            source: deb [arch=amd64 trusted=yes] https://download.docker.com/linux/ubuntu focal stable
        tailscale:
            source: deb [arch=amd64 trusted=yes] https://pkgs.tailscale.com/stable/ubuntu focal main

packages:
    - docker-ce
    - tailscale
    - aria2
    - build-essential
    - vim
    - tmux

runcmd:
    - tailscale up -authkey='REDACTED'

    - ufw --force reset
    - ufw allow in on tailscale0 to any
    - ufw --force
Score:1
sa flag

If your yaml pasted correctly, your indentation is wrong and you're missing a : on your docker line:

Try this:

#cloud-config

users:
    - name: ubuntu
      shell: /usr/bin/bash
      ssh_import_id: gh:skhaz
      sudo: ALL=(ALL:ALL) NOPASSWD:ALL

chpasswd:
    expire: false

apt_upgrade: true

apt:
    sources:
        docker:
            source: deb [arch=amd64 trusted=yes] https://download.docker.com/linux/ubuntu focal stable
        tailscale:
            source: deb [arch=amd64 trusted=yes] https://pkgs.tailscale.com/stable/ubuntu focal main

packages:
    - docker-ce
    - tailscale
    - aria2
    - build-essential
    - vim
    - tmux

runcmd:
    - tailscale up -authkey='REDACTED'

    - ufw --force reset
    - ufw allow in on tailscale0 to any
    - ufw --force

Notice the indentation on lines 5-7, and the : at the end of line 16.

In general, for debugging cloud-init, there's a command to check your #cloud-config against a schema. On the launched instance you can run cloud-init schema --system. Also, you can check /var/log/cloud-init.log for any WARNING or Traceback. The log can be fairly verbose, but that can at least give you a starting point.

cloud-init schema docs: https://cloudinit.readthedocs.io/en/latest/topics/cli.html#schema

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.