nextcloud / ansible-collection-nextcloud-admin

The ansible galaxy for your nextcloud administrative needs.
https://galaxy.ansible.com/nextcloud/admin
BSD 2-Clause "Simplified" License
138 stars 77 forks source link

install_nextcloud: all variable names should start with `install_nextcloud_` #365

Open RussellAult opened 2 months ago

RussellAult commented 2 months ago

Description

Currently, many of the install_nextcloud role's internal variables are prefixed with nextcloud_, but ansible-lint's var-naming rule specifies that a prefix of role_name_ should be applied to all role-specific variables. This causes ansible-lint to throw errors if the role is includeed or imported with any vars parameters.

Steps to reproduce

# roles/custom_nextcloud/tasks/main.yml

- name: Install Nextcloud
  ansible.builtin.include_role:
    name: nextcloud.admin.install_nextcloud
  vars:
    nextcloud_disable_websrv_default_site: true

Expected outcome

No ansible-lint errors

Actual outcome

$ roles/custom_nextcloud/tasks/main.yml
WARNING  Listing 1 violation(s) that are fatal
var-naming[no-role-prefix]: Variables names from within roles should use role_name_ as a prefix. (vars: nextcloud_disable_websrv_default_site)