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 841B

12345678910111213141516
  1. - name: Create directory for blog HTML
  2. file: state=directory path=/var/www/{{ domain }} group=www-data owner=www-data
  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. command: rm /etc/apache2/sites-enabled/{{ domain }} removes=/etc/apache2/sites-enabled/{{ domain }}
  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