Created
January 12, 2020 12:46
-
-
Save aheil/3ce848282985d0ca02b111ecf3bc5174 to your computer and use it in GitHub Desktop.
Ansible role for Raspberry Pi automated wifi rapair installation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Raspberry Pi (and Linux) Wifi Repair Automation | |
# Created: 2020/01/09 19:41:05 | |
# Last modified: 2020/01/12 13:44:17 | |
- name: Install prerequisite packages | |
become: yes | |
apt: | |
name: "{{ packages }}" | |
state: latest | |
update_cache: yes | |
vars: | |
packages: | |
- ifupdown | |
- fping | |
tags: | |
- raspi | |
- common | |
- wifi-repair | |
- name: Create folder | |
become: yes | |
file: | |
path: "{{ WIFI_REPAIR_INSTALL_DIR }}" | |
state: directory | |
tags: | |
- raspi | |
- common | |
- wifi-repair | |
- name: Clone bash-network-repair-automation repository | |
become: yes | |
git: | |
repo: https://github.com/aheil/bash-network-repair-automation.git | |
dest: "{{ WIFI_REPAIR_INSTALL_DIR }}" | |
force: yes | |
tags: | |
- raspi | |
- common | |
- wifi-repair | |
- name: Enale reboot as last obtion if network does not restart | |
become: yes | |
lineinfile: | |
path: "{{ WIFI_REPAIR_INSTALL_DIR }}/network_check.sh" | |
regex: '^reboot_server=' | |
line: "reboot_server=true" | |
state: present | |
tags: | |
- raspi | |
- common | |
- wifi-repair | |
- name: Enable cron job to check wifi every minute | |
become: yes | |
cron: | |
name: "wifi repair automation" | |
job: "{{ WIFI_REPAIR_INSTALL_DIR }}/network_check.sh" | |
tags: | |
- raspi | |
- common | |
- wifi-repair |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment