- name: Backup config to git repo@nas
  hosts: localhost

  vars:
    src_dirs: 
      - "/home/belar/.config/"
      - "/etc"
    dst_dir: "/home/belar/nas_belar/backup/hotaru/"
    commit_msg: "Config backup {{ ansible_date_time.iso8601 }}"

  tasks:
    - name: Copy files to destination
      copy:
        src: "{{ item }}"
        dest: "{{ dst_dir }}/{{ item | basename }}"
      with_items:
        - "{{ src_dirs }}"
