aboutsummaryrefslogblamecommitdiffstatshomepage
path: root/roles/my_workspace/tasks/main.yml
blob: 462c8dadb4da9ce3ec3d4bf4ca5aa933ecbfef8e (plain) (tree)
1
2
3
4
5
6
7
8
                                  
                       
                                  

                               
               

                            
                          
           
            
                  





                                   
                                            



                                   
                                             

                                            
                                     
                     
- name: Create workspace directory
  become: true
  ansible.builtin.file:
    path: '{{ my_workspace_dir }}'
    state: directory
    owner: '{{ ansible_user }}'
    group: '{{ ansible_user }}'
    mode: '750'

- name: Install dependencies
  become: true
  ansible.builtin.package:
    name:
      - git
      - make
    state: present

- name: Configure git
  block:
    - name: Set user.name
      community.general.git_config:
        scope: global
        name: user.name
        value: '{{ my_workspace_git_name }}'

    - name: Set user.email
      community.general.git_config:
        scope: global
        name: user.email
        value: '{{ my_workspace_git_email }}'

- name: Update projects
  ansible.builtin.include_tasks: project.yml
  loop: '{{ my_workspace_projects }}'
  loop_control:
    loop_var: project