summaryrefslogtreecommitdiffstats
path: root/roles/dotfiles/tasks/main.yml
blob: 02a17c70a6d88f9187f54370f307e630e21f7913 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
---
- name: "Clone dotfiles git repo"
  ansible.builtin.git:
    repo: "{{ dotfiles_repo_url }}"
    dest: "{{ ansible_facts['env']['HOME'] }}/.rc"
    clone: true
    update: false
    single_branch: true
    version: "main"

- name: "Setup dotfiles"
  ansible.builtin.shell:
    cmd: "{{ dotfiles_setup_script }}"
    executable: "/bin/bash"
  register: dotfiles_setup
  changed_when: true
  tags:
    # Since the script will report changed every time (even thought it's idempotent)
    - molecule-idempotence-notest

- name: "Show dotfile setup output"
  ansible.builtin.debug:
    var: dotfiles_setup.stdout
  tags:
    # Since this doesn't run on idempotence testing
    - molecule-idempotence-notest