diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-08-23 21:35:30 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-08-23 21:40:18 +0200 |
commit | 9062ea04823b0464280d0a6dcd2e67003ce0d2e1 (patch) | |
tree | f17ee1c3176a64ecda4442f7a08fc406b64a9e51 /roles/my_workspace | |
parent | v0.0.19 (diff) | |
download | infra-ansible-9062ea04823b0464280d0a6dcd2e67003ce0d2e1.tar.gz infra-ansible-9062ea04823b0464280d0a6dcd2e67003ce0d2e1.zip |
properly prefix things
Diffstat (limited to 'roles/my_workspace')
-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: |