Playbooks to a new Lilik
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
1.3 KiB

8 years ago
  1. - name: create sign user
  2. user:
  3. name: sign
  4. shell: /srv/ca/manager.py
  5. - name: create request user
  6. user:
  7. name: request
  8. shell: /srv/ca/request_server.py
  9. - name: install ca packages
  10. apt:
  11. name: "{{ item }}"
  12. state: present
  13. update_cache: yes
  14. cache_valid_time: 3600
  15. install_recommends: '{{ install_recommends | default("no") }}'
  16. with_items:
  17. - git
  18. - python3
  19. - python3-pip
  20. - name: install peewee with pip
  21. pip:
  22. name: peewee
  23. executable: pip3
  24. - name: clone ca repository
  25. git:
  26. repo: https://github.com/LILiK-117bis/ca_manager.git
  27. dest: /srv/ca
  28. - name: create /var/lib/ca_manager
  29. file:
  30. path: /var/lib/ca_manager
  31. owner: sign
  32. group: sign
  33. mode: 0751
  34. state: directory
  35. - name: set outputs permissions
  36. file:
  37. path: /var/lib/ca_manager/outputs
  38. owner: sign
  39. group: sign
  40. mode: 0751
  41. state: directory
  42. - name: set private permissions
  43. file:
  44. path: /var/lib/ca_manager/private
  45. owner: sign
  46. group: sign
  47. mode: 0700
  48. state: directory
  49. - name: set requests permissions
  50. file:
  51. path: /var/lib/ca_manager/requests
  52. owner: sign
  53. group: request
  54. mode: 0730
  55. state: directory
  56. - name: set results permissions
  57. file:
  58. path: /var/lib/ca_manager/results
  59. owner: sign
  60. group: sign
  61. mode: 0751
  62. state: directory