diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-08-04 11:52:07 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-08-04 12:05:50 +0200 |
commit | 5cf47ce64eff1da4086e41782bb6bfb67a001b7d (patch) | |
tree | 5cbdf0bdf9aabaf2c64c3a95d3f1eda4fd53ae74 /roles/workspace/tasks/main.yml | |
parent | import some common roles (diff) | |
download | infra-ansible-5cf47ce64eff1da4086e41782bb6bfb67a001b7d.tar.gz infra-ansible-5cf47ce64eff1da4086e41782bb6bfb67a001b7d.zip |
import workspace role
Diffstat (limited to '')
-rw-r--r-- | roles/workspace/tasks/main.yml | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/roles/workspace/tasks/main.yml b/roles/workspace/tasks/main.yml new file mode 100644 index 0000000..a554ac0 --- /dev/null +++ b/roles/workspace/tasks/main.yml @@ -0,0 +1,33 @@ +- name: Workspace directory + become: true + ansible.builtin.file: + path: '{{ workspace_dir }}' + state: directory + owner: '{{ ansible_user }}' + group: '{{ ansible_user }}' + mode: '0750' + +- name: Install dependencies + become: true + ansible.builtin.apt: + name: + - git + - vim + +- name: Configure git + block: + - name: Set user.name + community.general.git_config: + scope: global + name: user.name + value: '{{ git_name }}' + + - name: Set user.email + community.general.git_config: + scope: global + name: user.email + value: '{{ git_email }}' + +- name: Update projects + ansible.builtin.include_tasks: project.yml + loop: '{{ workspace_projects }}' |