diff --git a/.gitmodules b/.gitmodules index 4f5b028..a57e539 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "collections/ansible_collections/community/general"] path = collections/ansible_collections/community/general url = https://github.com/ansible-collections/community.general.git +[submodule "roles/do1jlr.ansible_version"] + path = roles/do1jlr.ansible_version + url = https://github.com/roles-ansible/ansible_role_versioncheck.git diff --git a/.yamllint b/.yamllint index 6f4fce2..3e67ea4 100644 --- a/.yamllint +++ b/.yamllint @@ -2,7 +2,15 @@ extends: default rules: - # 150 chars should be enough, but don't fail if a line is longer + # 180 chars should be enough, but don't fail if a line is longer line-length: max: 180 level: warning + comments: + min-spaces-from-content: 1 + comments-indentation: false + braces: + max-spaces-inside: 1 + octal-values: + forbid-implicit-octal: true + forbid-explicit-octal: true diff --git a/group_vars/all/ansible_version.yml b/group_vars/all/ansible_version.yml new file mode 100644 index 0000000..860e1f6 --- /dev/null +++ b/group_vars/all/ansible_version.yml @@ -0,0 +1,2 @@ +--- +check_ansible_version: '2.20.1' diff --git a/roles/do1jlr.ansible_version b/roles/do1jlr.ansible_version new file mode 160000 index 0000000..2bf5d7c --- /dev/null +++ b/roles/do1jlr.ansible_version @@ -0,0 +1 @@ +Subproject commit 2bf5d7c4369a8213b42829b14f78920e9906d099 diff --git a/site.yml b/site.yml index ed97d53..a7b8c43 100644 --- a/site.yml +++ b/site.yml @@ -1 +1,5 @@ --- +- name: Check ansible version + hosts: localhost + roles: + - {role: do1jlr.ansible_version, tags: [version, always]}