Wed, 13 Apr 2016 13:22:28 -0400
actually install lightdm
30
f468e5f566d1
break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
1 | --- |
43 | 2 | # This is a playbook to run as myself, with agent forwarding, to pull down my |
3 | # private dotfiles and set up. | |
4 | ||
30
f468e5f566d1
break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
5 | - hosts: devbox |
f468e5f566d1
break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
6 | gather_facts: false |
f468e5f566d1
break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
7 | tasks: |
f468e5f566d1
break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
8 | - name: Clone dotfiles |
f468e5f566d1
break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
9 | shell: > |
f468e5f566d1
break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
10 | hg clone -U {{dotfiles_repository | quote}} _dotfiles_ |
f468e5f566d1
break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
11 | && mv _dotfiles_/.hg . |
f468e5f566d1
break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
12 | && rmdir _dotfiles_ |
f468e5f566d1
break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
13 | && hg -R ~ update -C |
f468e5f566d1
break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
14 | args: |
f468e5f566d1
break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
15 | chdir: "~" |
f468e5f566d1
break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
16 | creates: "~/.hg" |
f468e5f566d1
break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
17 | |
f468e5f566d1
break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
18 | - name: Update dotfiles |
f468e5f566d1
break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
19 | command: hg pull -u |
f468e5f566d1
break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
20 | args: |
f468e5f566d1
break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
21 | chdir: "~" |
f468e5f566d1
break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
22 | register: update_dotfiles |
f468e5f566d1
break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
23 | 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
|
24 | failed_when: update_dotfiles.rc > 1 |
f468e5f566d1
break out dotfiles playbook and enable agent forwarding
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
25 | |
43 | 26 | - name: Run bin/homedir-setup |
27 | - shell: bin/homedir-setup | |
30
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 |