cloud-init_lin.tpl_2.yaml 639 B

123456789101112131415161718192021
  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 elastic nodes ptaf-b ptaf-a'
  20. path: /home/pt/cluster.sh
  21. permissions: '0777'