Ei kuvausta
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.

blog.yml 817B

12345678910111213141516
  1. - name: Create directory for blog HTML
  2. file: state=directory path=/var/www/{{ domain }} group=www-data owner={{ main_user_name }}
  3. - name: Rename existing Apache blog virtualhost
  4. command: mv /etc/apache2/sites-available/{{ domain }} /etc/apache2/sites-available/{{ domain }}.conf removes=/etc/apache2/sites-available/{{ domain }}
  5. - name: Remove old sites-enabled/{{ domain }} symlink (new one will be created by a2ensite)
  6. file: path=/etc/apache2/sites-enabled/{{ domain }} state=absent
  7. - name: Configure the Apache HTTP server for the blog
  8. template: src=etc_apache2_sites-available_blog.j2 dest=/etc/apache2/sites-available/{{ domain }}.conf group=root owner=root
  9. - name: Enable blog site
  10. command: a2ensite {{ domain }}.conf creates=/etc/apache2/sites-enabled/{{ domain }}.conf
  11. notify: restart apache