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

how can i install a package by means of a user-data file #170

Open
altineller opened this issue Mar 22, 2020 · 1 comment
Open

how can i install a package by means of a user-data file #170

altineller opened this issue Mar 22, 2020 · 1 comment

Comments

@altineller
Copy link

Hello,
After Install, I would like to run:

sudo apt install libnss-mdns

Can I accomplish it by putting it on where:

`runcmd:

  • 'systemctl restart avahi-daemon'

  • 'ifup wlan0'

  • 'mkdir /data && chown 1000:1000 /data'

  • [ systemctl, stop, docker ]

  • [ systemctl, daemon-reload ]

  • [ systemctl, enable, docker-tcp.socket ]

  • [ systemctl, start, --no-block, docker-tcp.socket ]

  • [ systemctl, start, --no-block, docker ]

`
after the ifup wlan0?

Best regards,
C.

@janz93
Copy link

janz93 commented Apr 5, 2020

Hello @altineller if I understand the issue correctly you want to use libnss-mdns package.
I am also very new to cloud init myself but if I understand the documentation correctly you can add it in the package section.
You need to add the package section in the file which you import via --userdata|-u

You file should look similar to the following:

#cloud-config
...
packages:
 - libnss-mdns
...

Maybe this will answer your question

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants