roles/rpi-base/tasks/main.yml
author Luke Hoersten <luke@hoersten.org>
Thu, 01 Mar 2018 17:14:13 -0600
changeset 18 3044f32e7f74
parent 14 1d79e73c881f
child 22 00185499ed12
permissions -rw-r--r--
Broke out separate hap-door role from hap-nodejs.

---

- name: turn swap off
  become: yes
  command: "swapoff -a"
  changed_when: false

- name: setup wifi
  become: yes
  template:
    src: "wpa_supplicant.conf.j2"
    dest: "/etc/wpa_supplicant/wpa_supplicant.conf"
    mode: 0644

- name: update apt package cache
  become: yes
  apt: upgrade="dist" update_cache="yes" cache_valid_time="3600"

- name: install extra apt packages
  become: yes
  apt: name="{{item}}"
  with_items: "{{rpi_base_apt_packages}}"

- name: authorize admin ssh keys
  become: yes
  authorized_key: user="pi" key="https://github.com/{{github_user}}.keys"

- name: remove swap apt package
  become: yes
  apt: state="absent" name="dphys-swapfile"