Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

41 lignes
1.0KB

  1. ---
  2. - name: installation directory
  3. file:
  4. path: "{{telegram_opt_directory}}"
  5. state: "{{ (telegram_source == 'git') | ternary('directory','absent') }}"
  6. - when: telegram_source == 'git'
  7. block:
  8. - name: get telegram-desktop releases
  9. uri:
  10. url: "{{telegram_git_releases_url}}"
  11. return_content: true
  12. register: _telegram_desktop_releases
  13. - name: download latest release
  14. get_url:
  15. url: "{{_telegram_desktop_dl_url}}"
  16. dest: "{{_telegram_desktop_dl_dest}}"
  17. - name: extract telegram release
  18. unarchive:
  19. src: "{{_telegram_desktop_dl_dest}}"
  20. remote_src: true
  21. dest: "{{telegram_opt_directory}}"
  22. mode: u=rwx,g=rx,o=rx
  23. owner: root
  24. group: root
  25. - name: link telegram-desktop binary
  26. file:
  27. src: "{{telegram_opt_directory}}/Telegram/Telegram"
  28. dest: /usr/local/bin/telegram-desktop
  29. state: link
  30. - name: unlink telegram-desktop binary
  31. file:
  32. path: /usr/local/bin/telegram-desktop
  33. state: absent
  34. when: telegram_source != 'git'