Skip to content
Snippets Groups Projects
Commit e710d447 authored by Chris Croome's avatar Chris Croome
Browse files

Ansible lint updates

parent 0e3c36e6
No related branches found
No related tags found
No related merge requests found
Pipeline #14241 failed
---
# https://docs.ansible.com/ansible-lint/rules/default_rules.html
skip_list:
# Lines should be no longer than 160 chars
- "204"
# rsync used in place of synchronize module
- "303"
# Package installs should not use latest
- "403"
# vim: syntax=yaml
...
---
image: registry.git.coop/webarch/containers/images/ansible:0.3
before_script:
- chmod 700 $(pwd)
stages:
- check
ansible-lint:
stage: check
- lint
lint:
stage: lint
script:
- yamllint .
- molecule lint
# vim: syntax=yaml
...
---
extends: default
yaml-files:
- '*.yaml'
- '*.yml'
rules:
braces:
max-spaces-inside: 1
......@@ -8,3 +11,6 @@ rules:
max-spaces-inside: 1
level: error
line-length: disable
comments-indentation: disable
# vim: syntax=yaml
...
---
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: instance
image: registry.git.coop/webarch/containers/images/ansible:0.3
pre_build_image: true
provisioner:
name: ansible
lint: |
set -e
yamllint -c .yamllint .
ansible-lint -c .ansible-lint.yml .
# vim: syntax=yaml
...
......@@ -59,7 +59,7 @@
common_name: "{{ inventory_hostname }}"
when:
- ( apache_cert.stat.exists == False )
- ( not apache_cert.stat.exists )
- ( "ssl" in apache_mods_enabled )
- ( "le" in apache_conf_enabled )
- ( common_name is defined ) and ( common_name == inventory_hostname )
......
......@@ -46,7 +46,7 @@
- name: Include MPM switching tasks
include_tasks: mpm.yml
when: ( apache_mpm_loaded not in apache_mods_enabled ) or ( apache_mpm_loaded == "" )
when: ( apache_mpm_loaded not in apache_mods_enabled ) or ( apache_mpm_loaded | length == 0 )
- name: Apache config available
include_tasks: config.yml
......
......@@ -6,6 +6,7 @@
git:
repo: https://git.coop/mc3coop/ssh-templates.git
dest: /var/www/mc3
version: master
clone: true
update: true
force: true
......
......@@ -44,7 +44,7 @@
when: apache_mpm_event_enabled.changed
when:
- ( apache_mpm_loaded == "mpm_prefork" ) or ( apache_mpm_loaded | length <= 0 )
- ( apache_mpm_loaded == "mpm_prefork" ) or ( apache_mpm_loaded | length == 0 )
- ( apache_mods_enabled is defined ) and ( "mpm_event" in apache_mods_enabled )
tags:
- apache
......@@ -73,7 +73,7 @@
when: apache_mpm_prefork_enabled.changed
when:
- ( apache_mpm_loaded == "mpm_event" ) or ( apache_mpm_loaded == "" )
- ( apache_mpm_loaded == "mpm_event" ) or ( apache_mpm_loaded | length == 0 )
- ( "mpm_prefork" in apache_mods_enabled )
tags:
- apache
......
......@@ -6,6 +6,7 @@
git:
repo: https://git.coop/webarch/website-templates.git
dest: /var/www/wsh
version: master
clone: true
update: true
force: true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment