From e307b5756996d5f5258f76765a9acc43435461cf Mon Sep 17 00:00:00 2001 From: Darren <27513732@qq.com> Date: Tue, 12 Jul 2022 13:02:03 +0800 Subject: [PATCH] Update main.yml --- apps/roles/role_common/tasks/main.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/apps/roles/role_common/tasks/main.yml b/apps/roles/role_common/tasks/main.yml index b576f7ce..443bfee6 100644 --- a/apps/roles/role_common/tasks/main.yml +++ b/apps/roles/role_common/tasks/main.yml @@ -65,9 +65,6 @@ - cert - apps failed_when: False - -- name: Create /data/wwwroot softlink to /data/apps - shell: ln -sf /data/apps /data/wwwroot - block: - name: set a regular hostname, remove "." @@ -110,3 +107,15 @@ - name: Check Docker Version shell: sudo sh -c "docker -v 1>> /data/logs/install_version.txt" + + +# Softlink +- name: Create a symbolic link + file: + src: '{{item.src}}' + dest: '{{item.dest}}' + state: link + force: yes + with_items: + - {src: /data/wwwroot/,dest: /data/apps} + - {src: /var/lib/docker/,dest: /data/docker}