roles/rpi-base/tasks/main.yml
author Luke Hoersten <luke@hoersten.org>
Mon, 23 Sep 2019 18:25:33 -0500
changeset 22 00185499ed12
parent 14 1d79e73c881f
permissions -rw-r--r--
Removed psudo services. Not needed anymore!
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     1
---
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     2
5
8e3d93a69233 Disabled rpi swap because it kills the sd cards.
Luke Hoersten <luke@hoersten.org>
parents: 4
diff changeset
     3
- name: turn swap off
8e3d93a69233 Disabled rpi swap because it kills the sd cards.
Luke Hoersten <luke@hoersten.org>
parents: 4
diff changeset
     4
  become: yes
8e3d93a69233 Disabled rpi swap because it kills the sd cards.
Luke Hoersten <luke@hoersten.org>
parents: 4
diff changeset
     5
  command: "swapoff -a"
8e3d93a69233 Disabled rpi swap because it kills the sd cards.
Luke Hoersten <luke@hoersten.org>
parents: 4
diff changeset
     6
  changed_when: false
8e3d93a69233 Disabled rpi swap because it kills the sd cards.
Luke Hoersten <luke@hoersten.org>
parents: 4
diff changeset
     7
0
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     8
- name: setup wifi
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     9
  become: yes
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    10
  template:
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    11
    src: "wpa_supplicant.conf.j2"
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    12
    dest: "/etc/wpa_supplicant/wpa_supplicant.conf"
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    13
    mode: 0644
22
00185499ed12 Removed psudo services. Not needed anymore!
Luke Hoersten <luke@hoersten.org>
parents: 14
diff changeset
    14
  when: rpi_enable_wifi
0
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    15
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    16
- name: update apt package cache
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    17
  become: yes
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    18
  apt: upgrade="dist" update_cache="yes" cache_valid_time="3600"
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    19
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    20
- name: install extra apt packages
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    21
  become: yes
22
00185499ed12 Removed psudo services. Not needed anymore!
Luke Hoersten <luke@hoersten.org>
parents: 14
diff changeset
    22
  apt: name="{{rpi_base_apt_packages}}"
0
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    23
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    24
- name: authorize admin ssh keys
30d8bcb1ebb4 Initial public commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    25
  become: yes
5
8e3d93a69233 Disabled rpi swap because it kills the sd cards.
Luke Hoersten <luke@hoersten.org>
parents: 4
diff changeset
    26
  authorized_key: user="pi" key="https://github.com/{{github_user}}.keys"
14
1d79e73c881f Moved package changes until wifi is set up.
Luke Hoersten <luke@hoersten.org>
parents: 9
diff changeset
    27
1d79e73c881f Moved package changes until wifi is set up.
Luke Hoersten <luke@hoersten.org>
parents: 9
diff changeset
    28
- name: remove swap apt package
1d79e73c881f Moved package changes until wifi is set up.
Luke Hoersten <luke@hoersten.org>
parents: 9
diff changeset
    29
  become: yes
1d79e73c881f Moved package changes until wifi is set up.
Luke Hoersten <luke@hoersten.org>
parents: 9
diff changeset
    30
  apt: state="absent" name="dphys-swapfile"