cloud-init_lin.tpl_1.yaml 686 B

12345678910111213141516171819202122
  1. #cloud-config
  2. #ssh_pwauth: no
  3. users:
  4. - name: yc-user
  5. sudo: ALL=(ALL) NOPASSWD:ALL
  6. groups: sudo
  7. shell: /bin/bash
  8. ssh_authorized_keys:
  9. - "${ssh_key}"
  10. write_files:
  11. - content: |
  12. #!/bin/bash
  13. sudo wsc -c 'host add 192.168.2.10 ptaf-a'
  14. sudo wsc -c 'host add 172.18.0.10 ptaf-b'
  15. sudo wsc -c 'timezone Europe/Moscow'
  16. sudo wsc -c 'ntp add ru.pool.ntp.org'
  17. sudo wsc -c 'cluster set mongo replset waf'
  18. sudo wsc -c 'cluster set elastic replset waf'
  19. sudo wsc -c 'cluster set mongo nodes ptaf-b'
  20. sudo wsc -c 'cluster set elastic nodes ptaf-a ptaf-b'
  21. path: /home/pt/cluster.sh
  22. permissions: '0777'