]> git.phdru.name Git - ansible.git/blob - playbooks/update-root.yml
1deda04634252fc20637a40e9321ecd937eef1a0
[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         force: no
26       loop: ['.bashrc', 'admin/home/root/.profile',
27              '.bash_logout', '.inputrc', '.less', '.lesskey',
28              '.screenrc', '.shellrc', '.tmux.conf', '.vimrc',
29             ]
30
31     - name: "Update root mc - overwrite files from ~phd/admin"
32       become: true
33       copy:
34         src: "~phd/admin/home/root/.mc/{{ item }}"
35         remote_src: yes
36         dest: ~root/.mc
37         owner: root
38         group: root
39         mode: "0600"
40         force: no
41       loop: ['hotlist', 'ini', 'panels.ini']
42