]> git.phdru.name Git - ansible.git/blob - playbooks/update-root.yml
c59578b13b702f61755e6d5551891a5c2f29f2bd
[ansible.git] / playbooks / update-root.yml
1 - name: "Update ~root from ~phd"
2   hosts: "{{ hosts | default('all') }}"
3   become: yes
4   gather_facts: false
5   tasks:
6     - name: "Update ~root - sync directories from ~phd"
7       synchronize:
8         src: "~phd/{{ item }}"
9         dest: ~root
10         archive: no  # avoid setting owner/group
11         recursive: yes
12         links: yes
13         times: yes
14       delegate_to: "{{ inventory_hostname }}"
15       loop: ['.vim', 'bin', 'lib']
16
17     - name: "Update ~root - sync files from ~phd"
18       copy:
19         src: "~phd/{{ item }}"
20         remote_src: yes
21         dest: ~root
22         owner: root
23         group: root
24         mode: "0600"
25       loop: ['.bashrc', 'admin/home/root/.profile',
26              '.bash_logout', '.inputrc', '.less', '.lesskey',
27              '.screenrc', '.shellrc', '.tmux.conf', '.vimrc',
28             ]
29
30     - name: "Update root mc - overwrite files from ~phd/admin"
31       become: true
32       copy:
33         src: "~phd/admin/home/root/.mc/{{ item }}"
34         remote_src: yes
35         dest: ~root/.mc
36         owner: root
37         group: root
38         mode: "0600"
39         force: no
40       loop: ['hotlist', 'ini', 'panels.ini']
41