aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roles/my_workspace/tasks/main.yml
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-08-15 15:07:48 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-08-15 15:07:48 +0200
commit15cceca6a25b9e5c228a6aa39fb087f8063273f6 (patch)
tree310e0914cd2c1e294faefbf7876b67b37ca2f384 /roles/my_workspace/tasks/main.yml
parentimport my_dotfiles role (diff)
downloadinfra-ansible-15cceca6a25b9e5c228a6aa39fb087f8063273f6.tar.gz
infra-ansible-15cceca6a25b9e5c228a6aa39fb087f8063273f6.zip
workspace -> my_workspace
Diffstat (limited to 'roles/my_workspace/tasks/main.yml')
-rw-r--r--roles/my_workspace/tasks/main.yml35
1 files changed, 35 insertions, 0 deletions
diff --git a/roles/my_workspace/tasks/main.yml b/roles/my_workspace/tasks/main.yml
new file mode 100644
index 0000000..179bdef
--- /dev/null
+++ b/roles/my_workspace/tasks/main.yml
@@ -0,0 +1,35 @@
+- name: Create workspace directory
+ become: true
+ ansible.builtin.file:
+ path: '{{ workspace_dir }}'
+ state: directory
+ owner: '{{ ansible_user }}'
+ group: '{{ ansible_user }}'
+ mode: '750'
+
+- name: Install dependencies
+ become: true
+ ansible.builtin.apt:
+ name:
+ - git
+ # I use Makefiles a lot, makes sense to install this:
+ - make
+ - 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 }}'