62 lines
1.4 KiB
YAML
62 lines
1.4 KiB
YAML
---
|
|
- hosts: all
|
|
tags: always
|
|
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"
|
|
value: "file:///usr/share/backgrounds/pop/kate-hazen-pop-retro1.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
|