Browse Source

fix:修复部署目标错误

Yin Bin 4 months ago
parent
commit
2af33e7af0
1 changed files with 5 additions and 5 deletions
  1. 5 5
      script/ansible/deploy_playbook.yml

+ 5 - 5
script/ansible/deploy_playbook.yml

@@ -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