Ingen beskrivning
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

blog.yml 888B

1234567891011121314151617181920
  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 the Apache sites config files
  5. template:
  6. src=etc_apache2_sites-available_blog.j2
  7. dest=/etc/apache2/sites-available/{{ item.name }}.conf
  8. owner=root
  9. group=root
  10. with_items: "{{ virtual_domains }}"
  11. - name: Remove old sites-enabled symlinks (new ones will be created by a2ensite)
  12. file: path=/etc/apache2/sites-enabled/{{ item }}.conf state=absent
  13. with_items: "{{ virtual_domains | json_query('[*].name') }}"
  14. - name: Enable Apache sites (creates new sites-enabled symlinks)
  15. command: a2ensite {{ item }}.conf creates=/etc/apache2/sites-enabled/{{ item }}.conf
  16. notify: restart apache
  17. with_items: "{{ virtual_domains | json_query('[*].name') }}"