Blog_IMIE/.ansible-ci.yml
2018-11-18 18:47:26 +01:00

29 lines
682 B
YAML

---
- hosts: hifive
become: yes
become_user: root
tasks:
- name: Delete last deploy
command: rm -rf /var/www/html/*
- 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 {} \;