aboutsummaryrefslogblamecommitdiffstatshomepage
path: root/roles/workspace/tasks/main.yml
blob: e2eb943e589995d09008d6b9e3c57542cd401a4e (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                               

                                                           


















                                            
- 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
      # 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 }}'