user_data.j2 671 B

1234567891011121314151617181920212223242526272829
  1. #cloud-config
  2. disable_root: {{ openshift_openstack_disable_root }}
  3. system_info:
  4. default_user:
  5. name: {{ openshift_openstack_user }}
  6. sudo: ["ALL=(ALL) NOPASSWD: ALL"]
  7. write_files:
  8. - path: /etc/sudoers.d/00-openshift-no-requiretty
  9. permissions: 440
  10. content: |
  11. Defaults:openshift !requiretty
  12. {% if openshift_openstack_provision_user_commands %}
  13. - path: /root/ansible_install.sh
  14. permissions: '0544'
  15. content: |
  16. {% for cmd in openshift_openstack_provision_user_commands %}
  17. {% if cmd is string %}
  18. {{ cmd }}
  19. {% elif cmd is iterable %}
  20. {{ cmd|join(' ') }}
  21. {% endif %}
  22. {% endfor %}
  23. runcmd:
  24. - /root/ansible_install.sh
  25. {% endif %}