local-desktop.yml 1.21 KB
Newer Older
Daniel Wayne Armstrong's avatar
Daniel Wayne Armstrong committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
# ansible-pull setup
#
# On remote hosts, set up ansible to run periodically via cron using the latest
# code from a particular git repository, in pull based fashion.
---

- hosts: localhost
  connection: local
  become: true

  vars:
      ansible_shell_allow_world_readable_temp: true 
      ssh_users: "dwa"

  pre_tasks:
    - name: update/upgrade system
      tags: always,apt
      apt:
        upgrade: dist
        update_cache: yes
      changed_when: false

  tasks:
Daniel Wayne Armstrong's avatar
Daniel Wayne Armstrong committed
24 25
    - include: tasks/base_sources.yml
    - include: tasks/base_packages.yml
Daniel Wayne Armstrong's avatar
Daniel Wayne Armstrong committed
26
    - include: tasks/base_users.yml
Daniel Wayne Armstrong's avatar
save  
Daniel Wayne Armstrong committed
27 28
    - include: tasks/base_dotfiles.yml
    - include: tasks/base_homebin.yml
Daniel Wayne Armstrong's avatar
Daniel Wayne Armstrong committed
29 30
    - include: tasks/base_sshd.yml
    - include: tasks/base_fstrim.yml
Daniel Wayne Armstrong's avatar
save  
Daniel Wayne Armstrong committed
31
      #- include: tasks/base_grub.yml
Daniel Wayne Armstrong's avatar
save  
Daniel Wayne Armstrong committed
32
    - include: tasks/desktop_xfce.yml
Daniel Wayne Armstrong's avatar
save  
Daniel Wayne Armstrong committed
33
      #- include: tasks/desktop_openbox.yml
Daniel Wayne Armstrong's avatar
Daniel Wayne Armstrong committed
34
    - include: tasks/desktop_packages.yml
Daniel Wayne Armstrong's avatar
save  
Daniel Wayne Armstrong committed
35
    - include: tasks/desktop_themes.yml
Daniel Wayne Armstrong's avatar
save  
Daniel Wayne Armstrong committed
36
    - include: tasks/desktop_lightdm.yml
Daniel Wayne Armstrong's avatar
save  
Daniel Wayne Armstrong committed
37
    - include: tasks/desktop_cron.yml
Daniel Wayne Armstrong's avatar
Daniel Wayne Armstrong committed
38 39 40 41 42 43 44 45 46

  handlers:
    - name: apt_update
      apt:
        update_cache: yes
    - name: restart_sshd
      service:
        name: sshd
        state: restarted
Daniel Wayne Armstrong's avatar
Daniel Wayne Armstrong committed
47 48 49
    - name: update_grub
      shell:
        cmd: update-grub
Daniel Wayne Armstrong's avatar
Daniel Wayne Armstrong committed
50