ansible-playbooks

another attempt to have everything organized ...
git clone https://git.e1e0.net/ansible-playbooks.git
Log | Files | Refs | README | LICENSE

commit 141a29ed743598379db79cc9b96f204b7eb09e42
parent 98a0178f81425c26d11c3f249a5f4053114c32f0
Author: Paco Esteban <paco@e1e0.net>
Date:   Tue,  7 Jan 2020 20:19:15 +0100

new gopher role

Diffstat:
Aroles/gopher/defaults/main.yml | 5+++++
Aroles/gopher/tasks/main.yml | 32++++++++++++++++++++++++++++++++
2 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/roles/gopher/defaults/main.yml b/roles/gopher/defaults/main.yml @@ -0,0 +1,5 @@ +--- +gopher_domain: "e1e0.net" +gopher_folder: "/var/gopher" +gopher_folder_owner: "paco" +gopher_folder_group: "daemon" diff --git a/roles/gopher/tasks/main.yml b/roles/gopher/tasks/main.yml @@ -0,0 +1,32 @@ +--- +- name: Install gophernicus + package: + name: gophernicus + state: latest + +- name: Set up inetd + blockinfile: + path: /etc/inetd.conf + state: present + create: yes + block: | + gopher stream tcp4 nowait _gophernicus /usr/local/libexec/in.gophernicus in.gophernicus -h "{{ gopher_domain }}" -nv + gopher stream tcp6 nowait _gophernicus /usr/local/libexec/in.gophernicus in.gophernicus -h "{{ gopher_domain }}" -nv + owner: root + group: wheel + mode: 0644 + +- name: Set up gopher folder permissions + file: + path: "{{ gopher_folder }}" + state: directory + owner: "{{ gopher_folder_owner }}" + group: "{{ gopher_folder_group }}" + mode: 0755 + + +- name: enable and start inetd + service: + name: inetd + state: started + enabled: yes