start_services.yml 925 B

123456789101112131415161718192021222324252627
  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: Create systemd unit file
  16. copy:
  17. src: "{{ role_path }}/files/prometheus-slurm-exporter.service"
  18. dest: "{{ systemd_path_dest }}"
  19. remote_src: no
  20. mode: "{{ file_permission }}"
  21. - name: Start services
  22. systemd:
  23. name: prometheus-slurm-exporter
  24. state: restarted
  25. enabled: yes