--- - hosts: localhost tags: always connection: local become: true pre_tasks: - name: pre-run | update package cache (arch) tags: always pacman: update_cache=yes changed_when: False when: ansible_distribution == "Archlinux" - name: pre-run | update package cache (debian, etc) tags: always apt: update_cache=yes changed_when: False when: ansible_distribution in ["Debian", "Ubuntu"] tasks: - name: install packages package: name: - htop - name: set wallpaper become_user: user dconf: key: "/org/gnome/desktop/background/picture-uri-dark" value: "file:///usr/share/backgrounds/System76-Fractal_Mountains-by_Kate_Hazen_of_System76.png" - name: set wallpaper position become_user: user dconf: key: "/org/gnome/desktop/background/picture-options" value: "'zoom'" - name: copy .zshrc file copy: src: files/zshrc dest: /home/user/.zshrc owner: user group: user - name: add ansible user user: name: ansible system: yes - name: set up sudo for ansible user copy: src: files/sudoers_ansible dest: /etc/sudoers.d/ansible owner: root group: root mode: 0440 - name: add ansible-pull cron job cron: name: ansible auto-provision user: ansible minute: "*/10" job: ansible-pull -o -U https://github.com/DeveloperDurp/DesktopAnsible.git