Без опису
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. - name: Create directories for HTML documents
  2. file: state=directory path={{ item }} group=www-data owner={{ main_user_name }}
  3. with_items: "{{ virtual_domains | json_query('[*].doc_root') | unique }}"
  4. - name: Create directory for well-known configs
  5. file: state=directory path=/var/www/well-known group=www-data owner=www-data
  6. - name: Create the Apache well-known config
  7. template:
  8. src=etc_apache2_conf-available_well-known.j2
  9. dest=/etc/apache2/conf-available/well-known.conf
  10. owner=root
  11. group=root
  12. notify: restart apache
  13. - name: Enable the Apache well-known config
  14. command: a2enconf well-known.conf creates=/etc/apache2/conf-enabled/well-known.conf.conf
  15. notify: restart apache
  16. - name: Setup PHP config
  17. template:
  18. src=etc_php_7.0_apache2_php.ini.j2
  19. dest=/etc/php/7.0/apache2/php.ini
  20. owner=root
  21. group=root
  22. notify: restart apache
  23. - name: Create an example blog index page
  24. template:
  25. src=var_www_blog_index.j2
  26. dest={{ item.doc_root }}/index.html
  27. owner=www-data
  28. group=www-data
  29. force=no
  30. with_items: "{{ virtual_domains }}"
  31. - name: Create the Apache blog sites config files
  32. template:
  33. src=etc_apache2_sites-available_blog.j2
  34. dest=/etc/apache2/sites-available/{{ item.name }}.conf
  35. owner=root
  36. group=root
  37. notify: restart apache
  38. with_items: "{{ virtual_domains }}"
  39. - name: Enable Apache blog sites (creates new sites-enabled symlinks)
  40. command: a2ensite {{ item }}.conf creates=/etc/apache2/sites-enabled/{{ item }}.conf
  41. notify: restart apache
  42. with_items: "{{ virtual_domains | json_query('[*].name') }}"