Commit e2bf5d4b authored by nono's avatar nono 💻
Browse files

Merge branch 'main' of git.laquadrature.net:lqdn-interne/piops-roles/don-lqdn

parents cac09795 2ce48a22
---
# Based on ansible-lint config
extends: default
rules:
braces:
max-spaces-inside: 1
level: error
brackets:
max-spaces-inside: 1
level: error
colons:
max-spaces-after: -1
level: error
commas:
max-spaces-after: -1
level: error
comments: disable
comments-indentation: disable
document-start: disable
empty-lines:
max: 3
level: error
hyphens:
level: error
indentation: disable
key-duplicates: enable
line-length: disable
new-line-at-end-of-file: disable
new-lines:
type: unix
trailing-spaces: disable
truthy: disable
galaxy_info:
author: your name
description: your role description
company: your company (optional)
role_name: don
author: Nono
description: Installation of the donnation website and configuration on a server
company: La Quadrature Du Net
namespace: lqdn
# If the issue tracker for your role is not on github, uncomment the
# next line and provide a value
......@@ -27,17 +29,11 @@ galaxy_info:
# To view available platforms and versions (or releases), visit:
# https://galaxy.ansible.com/api/v1/platforms/
#
# platforms:
# - name: Fedora
# versions:
# - all
# - 25
# - name: SomePlatform
# versions:
# - all
# - 1.0
# - 7
# - 99.99
platforms:
- name: Debian
versions:
- bullseye
galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
......@@ -47,6 +43,10 @@ galaxy_info:
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.
dependencies: []
# dependencies:
# - community.mysql
collections:
- community.mysql
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.
*********************************
Vagrant driver installation guide
*********************************
Requirements
============
* Vagrant
* Virtualbox, Parallels, VMware Fusion, VMware Workstation or VMware Desktop
Install
=======
Please refer to the `Virtual environment`_ documentation for installation best
practices. If not using a virtual environment, please consider passing the
widely recommended `'--user' flag`_ when invoking ``pip``.
.. _Virtual environment: https://virtualenv.pypa.io/en/latest/
.. _'--user' flag: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site
.. code-block:: bash
$ pip install 'molecule_vagrant'
---
- name: Converge
hosts: all
become: true
become_user: root
tasks:
- name: "Include don-lqdn"
include_role:
name: "don-lqdn"
---
dependency:
name: galaxy
driver:
name: vagrant
provider:
name: virtualbox
platforms:
- name: instance
box: debian/bullseye64
memory: 512
cpus: 1
provisioner:
name: ansible
verifier:
name: ansible
---
# This is an example playbook to execute Ansible tests.
- name: Verify
hosts: all
gather_facts: false
tasks:
- name: Example assertion
assert:
that: true
- name: Creation de l'utilisateur mySQL
mysql_user:
community.mysql.mysql_user:
name: "{{ don_sql_user }}"
password: "{{ don_sql_password }}"
priv: '*.*:ALL'
......
......@@ -37,11 +37,21 @@
become: no
become_user: don
- name: Création du dossier de don
file:
state: directory
path: /home/don/don/
owner: don
group: don
mode: 0775
recurse: true
- name: Statistiques du dossier git
stat:
path: /home/don/don/.git
register: don_git_patch_check
# Ce block ne clonera le dépot que si il n'existe pas déjà.
- name: Téléchargement du code source du site de don
git:
repo: https://git.laquadrature.net/lqdn-interne/don.git
......@@ -50,7 +60,6 @@
update: true
version: master
when: don_git_patch_check.stat.isdir is not defined or not don_git_patch_check.stat.isdir
# Le bloc au dessus ne clonera le dépot que si il n'existe pas déjà.
- name: Mise à jour du code source
git:
......@@ -60,15 +69,6 @@
version: master
force: true
- name: Création du dossier de don
file:
state: directory
path: /home/don/don/
owner: don
group: don
mode: 0775
recurse: true
- name: Installation des dépendances composer
shell: composer install -n
args:
......
......@@ -3,8 +3,8 @@
- include_tasks: setup.yml
- include: users.yml
- include: database.yml
- include: dependencies.yml
- include: database.yml
- include: install.yml
# - include: configuration.yml
- include: service.yml
......@@ -3,6 +3,11 @@
name: don
state: present
- name: Creation du groupe www-data
group:
name: www-data
state: present
- name: Mise en place de l'utilisateur don
user:
name: don
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment