|
@@ -1,5 +1,5 @@
|
|
|
---
|
|
|
-- hosts: all
|
|
|
+- hosts: webservers
|
|
|
vars:
|
|
|
deploy_path: /www/wwwroot/xiaoding
|
|
|
timestamp: "{{ ansible_date_time.year }}-{{ ansible_date_time.month }}-{{ ansible_date_time.day }}-{{ ansible_date_time.hour }}:{{ ansible_date_time.minute }}:{{ ansible_date_time.second }}"
|
|
@@ -30,7 +30,7 @@
|
|
|
file:
|
|
|
path: "{{ deploy_path }}"
|
|
|
state: directory
|
|
|
- mode: '0755'
|
|
|
+ mode: "0755"
|
|
|
|
|
|
- name: Copy project archive to remote
|
|
|
copy:
|
|
@@ -46,7 +46,7 @@
|
|
|
file:
|
|
|
path: "{{ deploy_path }}"
|
|
|
state: directory
|
|
|
- mode: '0755'
|
|
|
+ mode: "0755"
|
|
|
|
|
|
- name: Extract project archive
|
|
|
unarchive:
|
|
@@ -67,7 +67,7 @@
|
|
|
owner: www
|
|
|
group: www
|
|
|
recurse: yes
|
|
|
- mode: '0777'
|
|
|
+ mode: "0777"
|
|
|
|
|
|
- name: Clean up remote archive
|
|
|
file:
|
|
@@ -79,4 +79,4 @@
|
|
|
module: file
|
|
|
path: "/tmp/{{ project_archive }}"
|
|
|
state: absent
|
|
|
- run_once: true
|
|
|
+ run_once: true
|