From c156481c504ed66aaffe18434f6f5b77e497a4df Mon Sep 17 00:00:00 2001 From: Timo Makinen Date: Thu, 2 Sep 2021 16:34:58 +0000 Subject: [PATCH] lynx: Initial version of role --- lynx/files/html2text.sh | 3 +++ lynx/files/lynx-site.cfg | 2 ++ lynx/tasks/main.yml | 21 +++++++++++++++++++++ 3 files changed, 26 insertions(+) create mode 100755 lynx/files/html2text.sh create mode 100644 lynx/files/lynx-site.cfg create mode 100644 lynx/tasks/main.yml diff --git a/lynx/files/html2text.sh b/lynx/files/html2text.sh new file mode 100755 index 0000000..5237ffd --- /dev/null +++ b/lynx/files/html2text.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +cat "$@" | lynx -restrictions=all -dump -stdin -localhost -force_html -realm diff --git a/lynx/files/lynx-site.cfg b/lynx/files/lynx-site.cfg new file mode 100644 index 0000000..98d327c --- /dev/null +++ b/lynx/files/lynx-site.cfg @@ -0,0 +1,2 @@ +# Default home page +STARTFILE:https://www.foo.sh diff --git a/lynx/tasks/main.yml b/lynx/tasks/main.yml new file mode 100644 index 0000000..bc5182f --- /dev/null +++ b/lynx/tasks/main.yml @@ -0,0 +1,21 @@ +--- +- name: install packages + package: + name: lynx + state: installed + +- name: create site configuration + copy: + dest: /etc/lynx-site.cfg + src: lynx-site.cfg + mode: 0644 + owner: root + group: "{{ ansible_wheel }}" + +- name: install html2text script + copy: + dest: /usr/local/bin/html2text + src: html2text.sh + mode: 0755 + owner: root + group: "{{ ansible_wheel }}"