暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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') }}"