diff options
Diffstat (limited to '')
-rw-r--r-- | roles/my_workspace/defaults/main.yml | 4 | ||||
-rw-r--r-- | roles/my_workspace/tasks/main.yml | 4 | ||||
-rw-r--r-- | roles/my_workspace/tasks/project.yml | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/roles/my_workspace/defaults/main.yml b/roles/my_workspace/defaults/main.yml index 3b49b29..d1104af 100644 --- a/roles/my_workspace/defaults/main.yml +++ b/roles/my_workspace/defaults/main.yml @@ -1,5 +1,5 @@ git_name: Egor Tensin git_email: Egor.Tensin@gmail.com -workspace_dir: /srv/workspace -workspace_projects: [] +my_workspace_dir: /srv/workspace +my_workspace_projects: [] diff --git a/roles/my_workspace/tasks/main.yml b/roles/my_workspace/tasks/main.yml index 6bbb308..48af77b 100644 --- a/roles/my_workspace/tasks/main.yml +++ b/roles/my_workspace/tasks/main.yml @@ -1,7 +1,7 @@ - name: Create workspace directory become: true ansible.builtin.file: - path: '{{ workspace_dir }}' + path: '{{ my_workspace_dir }}' state: directory owner: '{{ ansible_user }}' group: '{{ ansible_user }}' @@ -30,6 +30,6 @@ - name: Update projects ansible.builtin.include_tasks: project.yml - loop: '{{ workspace_projects }}' + loop: '{{ my_workspace_projects }}' loop_control: loop_var: project diff --git a/roles/my_workspace/tasks/project.yml b/roles/my_workspace/tasks/project.yml index d6bf857..276d10b 100644 --- a/roles/my_workspace/tasks/project.yml +++ b/roles/my_workspace/tasks/project.yml @@ -2,7 +2,7 @@ vars: project_url: '{{ project.url | default(project) }}' project_name: "{{ project.name | default(project_url | urlsplit('path') | basename | regex_replace('\\.git$', '')) }}" - project_dir: '{{ workspace_dir }}/{{ project_name }}' + project_dir: '{{ my_workspace_dir }}/{{ project_name }}' block: - name: 'Update repository: {{ project_name }}' ansible.builtin.git: |