Blog_IMIE/.ansible-ci.yml
2018-11-18 18:56:22 +01:00

31 lines
707 B
YAML

---
- hosts: hifive
become: yes
become_user: root
tasks:
- name: Delete last deploy
file:
path: /var/www/html/
state: absent
- name: Copy all files to web server
synchronize:
src: /builds/aviortheking/blog_imie/project/
dest: /var/www/html
rsync_opts:
- --exclude=.htaccess
- name: Change ownership and group
file:
path: /var/www/html
owner: apache
group: apache
recurse: yes
- name: Change file chmod 640
command: find /var/www/html -type f -exec chmod 640 {} \;
- name: Change directory chmod 750
command: find /var/www/html -type d -exec chmod 750 {} \;