No Description
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.

dokuwiki.yml 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. - name: Install DokuWiki dependencies
  2. apt:
  3. name: "{{ packages }}"
  4. state: present
  5. vars:
  6. packages:
  7. - php
  8. - libapache2-mod-php
  9. tags:
  10. - dependencies
  11. - name: Create temporary DokuWiki directory
  12. file: state=directory path=/root/dokuwiki
  13. - name: Download DokuWiki {{ dokuwiki_version }} release
  14. get_url:
  15. url="{{ dokuwiki_release }}"
  16. dest=/root/dokuwiki/dokuwiki-{{ dokuwiki_version }}.tar.gz
  17. - name: Extract DokuWiki {{ dokuwiki_version }} release
  18. shell: tar xzvf /root/dokuwiki/dokuwiki-{{ dokuwiki_version }}.tar.gz
  19. args:
  20. chdir: /root/dokuwiki
  21. creates: /root/dokuwiki/dokuwiki-release_{{ dokuwiki_version }}
  22. - name: Copy DokuWiki to web server directory
  23. shell: cp -R /root/dokuwiki/dokuwiki-release_{{ dokuwiki_version }}/. /var/www/dokuwiki/
  24. - name: Copy DokuWiki initial data to our data directory
  25. shell: cp -R /var/www/dokuwiki/data/. /data/dokuwiki/
  26. - name: Ensure proper DokuWiki data directory permissions
  27. file:
  28. state: directory
  29. path: "/data/dokuwiki"
  30. owner: www-data
  31. group: www-data
  32. mode: 0750
  33. recurse: yes
  34. - name: Ensure proper DokuWiki permissions
  35. file:
  36. path=/var/www/dokuwiki
  37. state=directory
  38. recurse=yes
  39. owner=www-data
  40. group=www-data
  41. - name: Add DokuWiki htaccess
  42. copy:
  43. src=var_www_dokuwiki_htaccess
  44. dest=/var/www/dokuwiki/.htaccess
  45. owner=www-data
  46. group=www-data
  47. mode=0644
  48. - name: Remove DokuWiki installer
  49. file:
  50. path=/var/www/dokuwiki/install.php
  51. state=absent
  52. - name: Add initial DokuWiki ACL config
  53. copy:
  54. src=var_www_dokuwiki_conf_acl_auth.php
  55. dest=/var/www/dokuwiki/conf/acl.auth.php
  56. owner=www-data
  57. group=www-data
  58. mode=0644
  59. force=no
  60. - name: Add initial DokuWiki config file
  61. template:
  62. src=var_www_dokuwiki_conf_local.j2
  63. dest=/var/www/dokuwiki/conf/local.php
  64. owner=www-data
  65. group=www-data
  66. mode=0644
  67. force=no
  68. - name: Add initial DokuWiki admin user
  69. template:
  70. src=var_www_dokuwiki_conf_users_auth.j2
  71. dest=/var/www/dokuwiki/conf/users.auth.php
  72. owner=www-data
  73. group=www-data
  74. mode=0644
  75. force=no
  76. - name: Create the Apache dokuwiki sites config files
  77. template:
  78. src=etc_apache2_sites-available_dokuwiki.j2
  79. dest=/etc/apache2/sites-available/dokuwiki_{{ item.name }}.conf
  80. owner=root
  81. group=root
  82. with_items: "{{ virtual_domains }}"
  83. - name: Enable Apache sites (creates new sites-enabled symlinks)
  84. command: a2ensite dokuwiki_{{ item }}.conf creates=/etc/apache2/sites-enabled/dokuwiki_{{ item }}.conf
  85. notify: restart apache
  86. with_items: "{{ virtual_domains | json_query('[*].name') }}"