cloud-config.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #cloud-config
  2. write_files:
  3. - container: network
  4. path: /var/lib/iptables/rules.sh
  5. permissions: "0755"
  6. owner: root:root
  7. content: |
  8. #!/bin/bash
  9. set -ex
  10. echo $@ >> /var/log/net.log
  11. # the last line of the file needs to be a blank line or a comment
  12. rancher:
  13. network:
  14. dns:
  15. nameservers:
  16. - 8.8.4.4
  17. - 4.2.2.3
  18. pre_cmds:
  19. - /var/lib/iptables/rules.sh pre_cmds
  20. post_cmds:
  21. - /var/lib/iptables/rules.sh post_cmds
  22. interfaces:
  23. lo:
  24. pre_up:
  25. - /var/lib/iptables/rules.sh pre_up lo
  26. post_up:
  27. - /var/lib/iptables/rules.sh post_up lo
  28. eth0:
  29. pre_up:
  30. - /var/lib/iptables/rules.sh pre_up eth0
  31. post_up:
  32. - /var/lib/iptables/rules.sh post_up eth0
  33. eth1:
  34. dhcp: true
  35. pre_up:
  36. - /var/lib/iptables/rules.sh pre_up eth1
  37. post_up:
  38. - /var/lib/iptables/rules.sh post_up eth1
  39. eth2:
  40. address: 192.168.3.13/16
  41. mtu: 1450
  42. pre_up:
  43. - /var/lib/iptables/rules.sh pre_up eth2
  44. post_up:
  45. - /var/lib/iptables/rules.sh post_up eth2
  46. ssh_authorized_keys:
  47. - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC85w9stZyiLQp/DkVO6fqwiShYcj1ClKdtCqgHtf+PLpJkFReSFu8y21y+ev09gsSMRRrjF7yt0pUHV6zncQhVeqsZtgc5WbELY2DOYUGmRn/CCvPbXovoBrQjSorqlBmpuPwsStYLr92Xn+VVsMNSUIegHY22DphGbDKG85vrKB8HxUxGIDxFBds/uE8FhSy+xsoyT/jUZDK6pgq2HnGl6D81ViIlKecpOpWlW3B+fea99ADNyZNVvDzbHE5pcI3VRw8u59WmpWOUgT6qacNVACl8GqpBvQk8sw7O/X9DSZHCKafeD9G5k+GYbAUz92fKWrx/lOXfUXPS3+c8dRIF