dotfiles.yml

Wed, 13 Apr 2016 12:34:38 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Wed, 13 Apr 2016 12:34:38 -0400
changeset 32
70eb0f5478d8
parent 30
f468e5f566d1
child 43
31d5f9b7cff2
permissions
-rw-r--r--

break out settings for stable and testing

30
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
1 ---
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
2 - hosts: devbox
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
3 gather_facts: false
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
4 tasks:
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
5 - name: Clone dotfiles
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
6 become_user: "{{user.name}}"
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
7 shell: >
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
8 hg clone -U {{dotfiles_repository | quote}} _dotfiles_
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
9 && mv _dotfiles_/.hg .
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
10 && rmdir _dotfiles_
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
11 && hg -R ~ update -C
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
12 args:
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
13 chdir: "~"
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
14 creates: "~/.hg"
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
15
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
16 - name: Update dotfiles
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
17 become_user: "{{user.name}}"
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
18 command: hg pull -u
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
19 args:
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
20 chdir: "~"
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
21 register: update_dotfiles
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
22 changed_when: update_dotfiles.stdout | match("added|updated")
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
23 failed_when: update_dotfiles.rc > 1
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
24
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
25 - name: Run homedir-setup
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
26 become_user: "{{user.name}}"
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
27 shell: bin/homedir-setup
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
28 args:
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
29 chdir: "~"
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
30 register: homedir_setup
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
31 changed_when: homedir_setup.stdout | match("Updating|Cloning")
f468e5f566d1 break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
32 failed_when: homedir_setup.rc != 0

mercurial