This repository has been archived by the owner on Sep 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
finalizing uhttpd role for release 0.4.3
- Loading branch information
Showing
6 changed files
with
42 additions
and
41 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
--- | ||
namespace: imp1sh | ||
name: ansible_openwrt | ||
version: 0.4.0 | ||
version: 0.4.3 | ||
readme: README.md | ||
authors: | ||
- Jochen Demmer <[email protected]> | ||
description: ansible_openwrt is a full featured openwrt collection. It relies on python so you need enough disk space in order to be able to use it. | ||
license_file: 'LICENSE' | ||
tags: [openwrt, lede, dhcp, dnsmasq, dropbear, ssh, firewall, network, packages, restic, backup, services, system, wifi, wireless, wireguard, vpn, sqm, imagebuilder, wireguard] | ||
tags: [openwrt, lede, dhcp, dnsmasq, dropbear, ssh, firewall, network, packages, restic, backup, services, system, wifi, wireless, wireguard, vpn, sqm, imagebuilder, wireguard, uhttpd, tinyproxy, imagebuilder] | ||
dependencies: {} | ||
repository: https://github.com/imp1sh/ansible_openwrt | ||
documentation: https://wiki.junicast.de/en/junicast/docs/AnsibleOpenWrtCollection | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1 @@ | ||
Role Name | ||
========= | ||
|
||
A brief description of the role goes here. | ||
|
||
Requirements | ||
------------ | ||
|
||
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. | ||
|
||
Role Variables | ||
-------------- | ||
|
||
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. | ||
|
||
Dependencies | ||
------------ | ||
|
||
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. | ||
|
||
Example Playbook | ||
---------------- | ||
|
||
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: | ||
|
||
- hosts: servers | ||
roles: | ||
- { role: username.rolename, x: 42 } | ||
|
||
License | ||
------- | ||
|
||
BSD | ||
|
||
Author Information | ||
------------------ | ||
|
||
An optional section for the role authors to include contact information, or a website (HTML is not allowed). | ||
https://github.com/imp1sh/ansible_openwrt |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
--- | ||
# handlers file for ansible_uhttpd | ||
- name: restart uhttpd | ||
ansible.builtin.service: | ||
name: uhttpd | ||
state: restarted |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,31 @@ | ||
--- | ||
# tasks file for ansible_uhttpd | ||
- name: Make sure deploypath is present | ||
ansible.builtin.file: | ||
path: "{{ openwrt_uhttpd_deploypath }}" | ||
state: directory | ||
- name: search for existing certificate | ||
ansible.builtin.stat: | ||
path: "{{ openwrt_uhttpd_cert_searchpath }}/{{ inventory_hostname }}.cer" | ||
register: searchcert | ||
- name: search for existing key | ||
ansible.builtin.stat: | ||
path: "{{ openwrt_uhttpd_cert_searchpath }}/{{ inventory_hostname }}.key" | ||
register: searchkey | ||
- name: debug | ||
debug: | ||
msg: "{{ searchcert }}" | ||
- name: overwrite defaults with found cert and key | ||
ansible.builtin.set_fact: | ||
openwrt_uhttpd_main_cert: "{{ searchcert.stat.path }}" | ||
openwrt_uhttpd_main_key: "{{ searchkey.stat.path }}" | ||
when: | ||
- searchkey is defined | ||
- searchcert is defined | ||
- searchkey.stat.exists | ||
- searchcert.stat.exists | ||
- name: Deploy uhttpd config | ||
ansible.builtin.template: | ||
src: "uhttpd.jinja2" | ||
dest: "{{ openwrt_uhttpd_deploypath }}/{{ openwrt_uhttpd_deployfile }}" | ||
notify: restart uhttpd |