X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=playbooks%2Fdebian%2Fupdate-root.yml;fp=playbooks%2Fdebian%2Fupdate-root.yml;h=74d0a8c9b9027ff5ebd5b7cfbd0bb207a7314143;hb=e04e6116652d0496b51bd2dec7507c5fac209d73;hp=0000000000000000000000000000000000000000;hpb=1aba98e48d7de45085bd03b9f2e58b404a732a42;p=ansible.git diff --git a/playbooks/debian/update-root.yml b/playbooks/debian/update-root.yml new file mode 100644 index 0000000..74d0a8c --- /dev/null +++ b/playbooks/debian/update-root.yml @@ -0,0 +1,37 @@ +- 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'] +