Advertisement
nholloway2007

Untitled

Jan 14th, 2020
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. echo "> Staging Default Profile ..."
  4. cat <<EOF > /tmp/lxd-profile-default.yaml
  5. config:
  6. user.user-data: |
  7. #cloud-config
  8. package_upgrade: true
  9. packages:
  10. - jq
  11. - vim
  12. - lnav
  13. - byobu
  14. - snapd
  15. - squashfuse
  16. ssh_import_id: ${ccio_SSH_UNAME}
  17. users:
  18. - name: ubuntu
  19. shell: /bin/bash
  20. sudo: ['ALL=(ALL) NOPASSWD:ALL']
  21. ssh_import_id: ${ccio_SSH_SERVICE}:${ccio_SSH_UNAME}
  22. - name: ${ministack_UNAME}
  23. shell: /bin/bash
  24. sudo: ['ALL=(ALL) NOPASSWD:ALL']
  25. ssh_import_id: ${ccio_SSH_SERVICE}:${ccio_SSH_UNAME}
  26. runcmd:
  27. - [apt-get, autoremove, "-y"]
  28. - [cp, "-f", "/etc/skel/.bashrc", "/root/.bashrc"]
  29. - [cp, "-f", "/etc/skel/.bashrc", "/home/ubuntu/.bashrc"]
  30. - [cp, "-f", "/etc/skel/.bashrc", "/home/${ministack_UNAME}/.bashrc"]
  31. description: Default LXD Profile
  32. devices:
  33. eth0:
  34. name: eth0
  35. nictype: macvlan
  36. parent: external
  37. type: nic
  38. root:
  39. path: /
  40. pool: default
  41. type: disk
  42. name: default
  43. EOF
  44.  
  45. echo "> Loading Default Profile ..."
  46. lxc profile edit default < /tmp/lxd-profile-default.yaml
  47.  
  48. echo "> Default Profile is ready to use"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement