updated molecule, linting and meta

This commit is contained in:
AnsibleGuy 2022-08-12 18:58:06 +02:00
parent 46f33f5174
commit 6112334a4e
8 changed files with 29 additions and 17 deletions

6
.ansible-lint.yml Normal file
View File

@ -0,0 +1,6 @@
---
skip_list:
- 'var-naming'
- 'no-handler'
- 'role-name'

9
.yamllint Normal file
View File

@ -0,0 +1,9 @@
---
extends: default
rules:
truthy:
allowed-values: ['true', 'false', 'yes', 'no']
line-length:
max: 160

View File

@ -5,6 +5,9 @@ Ansible Role to deploy a ZoneMinder IP-CAM server.
Read into the [official documentation](https://zoneminder.readthedocs.io/en/stable/userguide/gettingstarted.html) on how to add ip-cams and so on. Read into the [official documentation](https://zoneminder.readthedocs.io/en/stable/userguide/gettingstarted.html) on how to add ip-cams and so on.
[![Molecule Test Status](https://badges.ansibleguy/sw_zoneminder.molecule.svg)]()
[![YamlLint Test Status](https://badges.ansibleguy/sw_zoneminder.yamllint.svg)]()
[![Ansible-Lint Test Status](https://badges.ansibleguy/sw_zoneminder.ansiblelint.svg)]()
[![Ansible Galaxy](https://img.shields.io/ansible/role/59996)](https://galaxy.ansible.com/ansibleguy/sw_zoneminder) [![Ansible Galaxy](https://img.shields.io/ansible/role/59996)](https://galaxy.ansible.com/ansibleguy/sw_zoneminder)
[![Ansible Galaxy Downloads](https://img.shields.io/badge/dynamic/json?color=blueviolet&label=Galaxy%20Downloads&query=%24.download_count&url=https%3A%2F%2Fgalaxy.ansible.com%2Fapi%2Fv1%2Froles%2F59996%2F%3Fformat%3Djson)](https://galaxy.ansible.com/ansibleguy/sw_zoneminder) [![Ansible Galaxy Downloads](https://img.shields.io/badge/dynamic/json?color=blueviolet&label=Galaxy%20Downloads&query=%24.download_count&url=https%3A%2F%2Fgalaxy.ansible.com%2Fapi%2Fv1%2Froles%2F59996%2F%3Fformat%3Djson)](https://galaxy.ansible.com/ansibleguy/sw_zoneminder)

View File

@ -3,11 +3,8 @@
galaxy_info: galaxy_info:
author: 'AnsibleGuy <guy@ansibleguy.net>' author: 'AnsibleGuy <guy@ansibleguy.net>'
namespace: 'ansibleguy' namespace: 'ansibleguy'
readme: 'README.md'
license: 'GPLv3' license: 'GPLv3'
repository: 'https://github.com/ansibleguy/sw_zoneminder'
issue_tracker_url: 'https://github.com/ansibleguy/sw_zoneminder/issues' issue_tracker_url: 'https://github.com/ansibleguy/sw_zoneminder/issues'
github_branch: 'stable'
min_ansible_version: 2.9.10 min_ansible_version: 2.9.10
description: 'Role to provision Zoneminder IP-CAM Servers' description: 'Role to provision Zoneminder IP-CAM Servers'
platforms: platforms:

View File

@ -43,20 +43,15 @@ provisioner:
name: ansible name: ansible
verifier: verifier:
name: ansible name: ansible
lint:
name: yamllint
scenario: scenario:
name: default name: default
test_sequence: test_sequence:
- lint - lint
- destroy - destroy
# - dependency
- syntax - syntax
- create - create
# - prepare
- converge - converge
- idempotence - idempotence
- check - check
# - side_effect
- verify - verify
- destroy - destroy

View File

@ -42,10 +42,10 @@
hosts: grp_tester hosts: grp_tester
gather_facts: false gather_facts: false
tasks: tasks:
- name: Checking if zoneminder web-service is reachable - name: Checking if zoneminder web-service is reachable
ansible.builtin.uri: ansible.builtin.uri:
url: 'https://zoneminder.test.ansibleguy.net' url: 'https://zoneminder.test.ansibleguy.net'
return_content: yes return_content: yes
validate_certs: false validate_certs: false
register: page register: page
failed_when: "'Zoneminder' not in page.content" failed_when: "'Zoneminder' not in page.content"

View File

@ -11,4 +11,4 @@ collections:
roles: roles:
- src: 'ansibleguy.infra_apache' - src: 'ansibleguy.infra_apache'
- src: 'ansibleguy.infra_certs' - src: 'ansibleguy.infra_certs'
- src: 'ansibleguy.infra_mariadb' - src: 'ansibleguy.infra_mariadb'

View File

@ -29,7 +29,9 @@
when: ZM_CONFIG.timezone not in NONE_VALUES when: ZM_CONFIG.timezone not in NONE_VALUES
- name: ZoneMinder | Debian | Webserver | Getting local timezone - name: ZoneMinder | Debian | Webserver | Getting local timezone
ansible.builtin.shell: "timedatectl | grep 'Time zone' | cut -d':' -f2 | cut -d' ' -f2" ansible.builtin.shell: |
set -o pipefail
timedatectl | grep 'Time zone' | cut -d':' -f2 | cut -d' ' -f2
register: controller_tz register: controller_tz
delegate_to: localhost delegate_to: localhost
changed_when: false changed_when: false