Skip to content
Extraits de code Groupes Projets
Valider f51549ec rédigé par nono's avatar nono :computer:
Parcourir les fichiers

Fix linting for molecule tasks

parent f869f77b
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!4Draft: Resolve "Add continuous integration testing via Gitlab CI"
---
galaxy_info:
author: nono
description: HedgeDoc
company: La Quadrature Du Net
role_name: ansible_role_hedgedocs # if absent directory name hosting role is used instead
namespace: lqdn # if absent, author is used instead
# if absent directory name hosting role is used instead
role_name: ansible_role_hedgedocs
namespace: lqdn
# If the issue tracker for your role is not on github, uncomment the
# next line and provide a value
......@@ -20,23 +22,10 @@ galaxy_info:
min_ansible_version: "2.1"
# If this a Container Enabled role, provide the minimum Ansible Container version.
# min_ansible_container_version:
#
# Provide a list of supported platforms, and for each platform a list of versions.
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
# To view available platforms and versions (or releases), visit:
# https://galaxy.ansible.com/api/v1/platforms/
#
platforms:
- name: Debian
versions:
<<<<<<< HEAD
- bookworm
=======
- 11
>>>>>>> 01f8e51 (Add meta information for galaxy)
- name: Debian
versions:
- bookworm
# - name: SomePlatform
# versions:
# - all
......@@ -45,13 +34,8 @@ galaxy_info:
# - 99.99
galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
# remove the '[]' above, if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.
dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.
dependencies:
- role: geerlingguy.nginx
- role: geerlingguy.nodejs
- role: geerlingguy.postgresql
......@@ -29,4 +29,4 @@ provisioner:
verifier:
name: ansible
lint: |
yamllint .
\ No newline at end of file
yamllint .
......@@ -12,7 +12,7 @@
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
}
nginx_vhosts:
- listen: "80 default_server"
......@@ -22,7 +22,7 @@
state: "present"
template: "{{ nginx_vhost_template }}"
filename: "{{ service_url }}.http.conf"
extra_parameters: |
extra_parameters: |
location / {
proxy_pass http://127.0.0.1:3003;
proxy_set_header Host $host;
......@@ -44,6 +44,9 @@
- geerlingguy.nginx
- geerlingguy.nodejs
- geerlingguy.postgresql
pre_tasks:
- name: Update Debian Package List
command: apt-get -y -o Acquire::GzipIndexes=false update
tasks:
- name: Install needed packages
ansible.builtin.package:
......@@ -52,12 +55,15 @@
- curl
- gnupg2
state: present
# We need to install Yarn via Raw because the default yarn package present in the debian repos is out-of-date.
# We need to install Yarn via Raw because the default yarn package
# present in the debian repos is out-of-date.
- name: Install yarn
raw: >
echo "deb https://dl.yarnpkg.com/debian/ stable main" >> /etc/apt/sources.list.d/yarn.list &&
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - &&
apt-get update
echo "deb https://dl.yarnpkg.com/debian/ stable main"
>> /etc/apt/sources.list.d/yarn.list &&
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg |
sudo apt-key add - &&
apt-get update
&& apt-get install -y --no-install-recommends yarn
args:
executable: /bin/bash
---
# Install the requirements for the test ( Nginx, NodeJS, pSQL )
- src: geerlingguy.nginx
- src: geerlingguy.nodejs
- src: geerlingguy.postgresql
\ No newline at end of file
- src: geerlingguy.postgresql
......@@ -5,27 +5,27 @@
hosts: all
gather_facts: false
tasks:
- name: Nginx is present
ansible.builtin.stat:
path: /usr/sbin/nginx
- name: Get service state
ansible.builtin.service_facts:
- name: Nginx is present
ansible.builtin.stat:
path: /usr/sbin/nginx
- name: Check that Nginx service is running
ansible.builtin.assert:
that:
- services["nginx.service"]["state"] == "running"
- services["nginx.service"]["status"] == "enabled"
- name: Check that pSQL service is running
ansible.builtin.assert:
that:
- services["postgresql@11-main.service"]["state"] == "running"
- services["postgresql@11-main.service"]["status"] == "active"
- name: Check that Hedgedocs service is running
ansible.builtin.assert:
that:
- services["hedgedocs.service"]["state"] == "running"
- services["hedgedocs.service"]["status"] == "enabled"
\ No newline at end of file
- name: Get service state
ansible.builtin.service_facts:
- name: Check that Nginx service is running
ansible.builtin.assert:
that:
- services["nginx.service"]["state"] == "running"
- services["nginx.service"]["status"] == "enabled"
- name: Check that pSQL service is running
ansible.builtin.assert:
that:
- services["postgresql@11-main.service"]["state"] == "running"
- services["postgresql@11-main.service"]["status"] == "active"
- name: Check that Hedgedocs service is running
ansible.builtin.assert:
that:
- services["hedgedocs.service"]["state"] == "running"
- services["hedgedocs.service"]["status"] == "enabled"
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter