main.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # Copyright 2020 Dell Inc. or its subsidiaries. All Rights Reserved.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. ---
  15. - name: Helm - add JupyterHub repo
  16. command: "helm repo add jupyterhub '{{ jupyterhub_helm_chart_repo }}'"
  17. changed_when: true
  18. - name: Helm - update repo
  19. command: helm repo update
  20. changed_when: true
  21. - name: Copy JupyterHub custom config file
  22. copy:
  23. src: jupyter_config.yaml
  24. dest: "{{ jupyter_config_file_dest }}"
  25. owner: root
  26. group: root
  27. mode: "{{ jupyter_config_file_mode }}"
  28. - name: JupyterHub deploy
  29. command: >
  30. helm upgrade --cleanup-on-fail \
  31. --install {{ jupyterhub_namespace }} jupyterhub/jupyterhub \
  32. --namespace {{ jupyterhub_namespace }} \
  33. --create-namespace \
  34. --version {{ helm_chart_version }} \
  35. --values {{ jupyter_config_file_dest }} \
  36. --timeout {{ timeout_min_sec }}
  37. changed_when: true
  38. failed_when: false
  39. register: deployment_output