add pounce, litterbox and scooper

This commit is contained in:
rick 2023-01-21 20:04:13 +01:00
parent a68a1a43bf
commit 8b2dccc9be
Signed by: Rick
GPG key ID: 4A6223D66294EB20
4 changed files with 215 additions and 0 deletions

View file

@ -0,0 +1,49 @@
################################################################################
# installation de litterbox
#
# Copyright (C) 2022 rick G. <rick@gnous.eu>
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.
################################################################################
---
- name: création utilisateur litterbox
ansible.builtin.user:
name: "{{ litterbox.user }}"
shell: "/bin/bash"
state: present
- name: mise en place de litterbox
block:
- name: clonage de litterbox
ansible.builtin.git:
dest: "{{ litterbox.path_tmp_git }}"
repo: "{{ litterbox.git }}"
single_branch: yes
- name: configuration de la compilation de litterbox
ansible.builtin.command:
cmd: "./configure"
chdir: "{{ litterbox.path_tmp_git }}"
- name: compilation de litterbox
community.general.make:
chdir: "{{ litterbox.path_tmp_git }}"
become: yes
become_user: "{{ litterbox.user }}"
- name: installation de litterbox
community.general.make:
chdir: "{{ litterbox.path_tmp_git }}"
target: install

View file

@ -0,0 +1,68 @@
################################################################################
# installation de pounce et de litterbox, scooper et kcgi
#
# Copyright (C) 2022 rick G. <rick@gnous.eu>
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.
################################################################################
---
- name: installation des paquets nécessaires
apt:
name:
- bmake
- sqlite3
- libsqlite3-dev
- universal-ctags
- pkg-config
- name: création utilisateur pounce
ansible.builtin.user:
name: "{{ user }}"
shell: "/bin/bash"
state: present
- name: mise en place de pounce
block:
- name: clonage de pounce
ansible.builtin.git:
dest: "{{ path_tmp_git }}"
repo: "{{ git }}"
single_branch: yes
- name: configuration de la compilation de pounce
ansible.builtin.command:
cmd: "{{ path_tmp_git }}/configure"
chdir: "{{ path_tmp_git }}"
- name: compilation de pounce
community.general.make:
chdir: "{{ path_tmp_git }}"
become: yes
become_user: "{{ user }}"
- name: installation de pounce
community.general.make:
chdir: "{{ path_tmp_git }}"
target: install
- name: installation du logger
include_role:
name: pounce
tasks_from: litterbox
- name: installation de l'interface graphique
include_role:
name: pounce
tasks_from: scooper

View file

@ -0,0 +1,78 @@
################################################################################
# installation de kcgi et scooper
#
# Copyright (C) 2022 rick G. <rick@gnous.eu>
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.
################################################################################
---
- name: téléchargement de kcgi
ansible.builtin.get_url:
dest: "{{ kcgi.path_tmp }}"
url: "{{ kcgi.url_file }}"
- name: décompression de kcgi
ansible.builtin.unarchive:
dest: "{{ kcgi.path_tmp }}"
src: "{{ kcgi.path_tmp }}/{{ kcgi.file_name }}"
list_files: true
register: result
- name: tset
debug:
msg: "{{ result.files[0] }}"
- name: modification du makefile
ansible.builtin.command:
cmd: "sed -i -e 's/#CPPFLAG/CPPFLAG/' {{ kcgi.path_tmp }}/{{ result.files[0] }}/Makefile"
- name: configuration de la compilation de kcgi
ansible.builtin.command:
cmd: "./configure"
chdir: "{{ kcgi.path_tmp }}/{{ result.files[0] }}"
- name: compilation de kcgi
ansible.builtin.command:
cmd: "bmake"
chdir: "{{ kcgi.path_tmp }}/{{ result.files[0] }}"
- name: installation de kcgi
ansible.builtin.command:
cmd: "bmake install"
chdir: "{{ kcgi.path_tmp }}/{{ result.files[0] }}"
- name: mise en place de scooper
block:
- name: téléchargement de scooper
ansible.builtin.git:
dest: "{{ scooper.path_tmp_git }}"
repo: "{{ scooper.git }}"
single_branch: yes
- name: configuration de la compilation de scooper
ansible.builtin.command:
cmd: "./configure"
chdir: "{{ scooper.path_tmp_git }}"
- name: compilation de scooper
community.general.make:
chdir: "{{ scooper.path_tmp_git }}"
- name: installation de scooper
community.general.make:
chdir: "{{ scooper.path_tmp_git }}"
target: install
become: yes
become_user: "{{ litterbox.user }}"

View file

@ -0,0 +1,20 @@
---
git: "https://git.causal.agency/pounce"
user: "pounce"
home_user: "/home/{{ user }}"
path_tmp_git: "{{ home_user }}/pounce"
litterbox:
git: "https://git.causal.agency/litterbox"
user: "litterbox"
home_user: "/home/litterbox"
path_tmp_git: "/home/litterbox/litterbox"
kcgi:
path_tmp: "/tmp/"
url_file: "https://kristaps.bsd.lv/kcgi/snapshots/kcgi.tgz"
file_name: "kcgi.tgz"
scooper:
path_tmp_git: "{{ litterbox.home_user }}/scooper"
git: "https://git.causal.agency/scooper/"