blob: 50f8d542959c7b4567eed17f1fb4c5648bf48bc3 (
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
27
28
|
---
- name: install yadm
ansible.builtin.package:
name: yadm
state: present
- name: clone repository
ansible.builtin.shell: yes n | yadm clone "{{ dotfiles_repo_url }}"
register: dotfiles_clone_result
changed_when:
- dotfiles_clone_result.rc != 0
- "'Git repo already exists' not in dotfiles_clone_result.stderr"
failed_when:
- dotfiles_clone_result.rc != 0
- "'Git repo already exists' not in dotfiles_clone_result.stderr"
- name: check that yadm bootstrap script exists
ansible.builtin.stat:
path: "/home/{{ dotfiles_workstation_user }}/.config/yadm/bootstrap"
register: dotfiles_bootstrap_result
- name: execute yadm bootstrap
ansible.builtin.command: yadm bootstrap
when:
- dotfiles_bootstrap_result.stat.exists
- dotfiles_bootstrap_result.stat.executable
changed_when: false
|