Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_userdata body truncated on '=' #320

Closed
bchatelard opened this issue Mar 25, 2016 · 1 comment
Closed

_userdata body truncated on '=' #320

bchatelard opened this issue Mar 25, 2016 · 1 comment
Assignees

Comments

@bchatelard
Copy link
Contributor

scw -D _userdata 5dbc6184-a646-4ec5-ab9e-ada170eeda73 cloud-init="`cat ~/Downloads/cloud-init.yml`"                           bastien@Bastien
DEBU[0000] curl -X PATCH -d "#cloud-config\n\nhostname: \"coreos\"\n\ncoreos:\n  units:\n    - name: runcmd.service\n      command: start\n      content: |\n        [Unit]\n        Description" -H "Content-Type: text/plain" -H "User-Agent: scw/v1.7.1+dev" -H "X-Auth-Token: 00000000-0000-1000-0000-000000000000" https://api.scaleway.com/servers/5dbc6184-a646-4ec5-ab9e-ada170eeda73/user_data/cloud-init
cloud-init
DEBU[0000] Writing cache file to disk
cat ~/Downloads/cloud-init.yml
#cloud-config

hostname: "coreos"

coreos:
  units:
    - name: runcmd.service
      command: start
      content: |
        [Unit]
        Description=Mark as booted

        [Service]
        Type=oneshot
        ExecStart=/bin/sh -c "curl http://169.254.42.42/state -X PATCH -d '{\"state_detail\": \"booted\"}' -H 'Content-Type: application/json'"
@QuentinPerez
Copy link
Contributor

Hi @bchatelard thank for your feedback ☺️

Fixed here

$> scw _userdata 8cc2d32c-5444-4998-81e9-964134700ba7 CLOUD-INIT="`cat cloud-init.yml`"
CLOUD-INIT
$> scw _userdata 8cc2d32c-5444-4998-81e9-964134700ba7 CLOUD-INIT
#cloud-config

hostname: "coreos"

coreos:
  units:
    - name: runcmd.service
      command: start
      content: |
        [Unit]
        Description=Mark as booted

        [Service]
        Type=oneshot
        ExecStart=/bin/sh -c "curl http://169.254.42.42/state -X PATCH -d '{\"state_detail\": \"booted\"}' -H 'Content-Type: application/json'"

@moul moul closed this as completed Mar 27, 2016
clement-gilbert pushed a commit to clement-gilbert/scaleway-cli that referenced this issue Mar 3, 2022
Signed-off-by: Patrik Cyvoct <pcyvoct@scaleway.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants