loop: ['.local/share/mc']
when: links_exist.rc != 0
-- name: "Setup root ms - overwrite files from ~phd/admin"
+- name: "Setup root mc - overwrite files from ~phd/admin"
become: true
copy:
src: "~phd/admin/home/root/.mc/{{ item }}"
--- /dev/null
+- name: "Update ~root from ~phd"
+ hosts: "{{ hosts | default('all') }}"
+ become: yes
+ gather_facts: false
+ tasks:
+ - name: "Update ~root - sync directories from ~phd"
+ command: "rsync -rlt --info=name ~phd/{{ item }} ~root"
+ register: rsync
+ changed_when: "rsync.stdout != ''"
+ loop: ['.vim', 'bin', 'lib']
+
+ - name: "Update ~root - sync files from ~phd"
+ copy:
+ src: "~phd/{{ item }}"
+ remote_src: yes
+ dest: ~root
+ owner: root
+ group: root
+ mode: "0600"
+ force: no
+ loop: ['.bashrc', 'admin/home/root/.profile',
+ '.bash_logout', '.inputrc', '.less', '.lesskey',
+ '.screenrc', '.shellrc', '.tmux.conf', '.vimrc',
+ ]
+
+ - name: "Update root mc - overwrite files from ~phd/admin"
+ become: true
+ copy:
+ src: "~phd/admin/home/root/.mc/{{ item }}"
+ remote_src: yes
+ dest: ~root/.mc
+ owner: root
+ group: root
+ mode: "0600"
+ force: no
+ loop: ['hotlist', 'ini', 'panels.ini']
+