Skip to content

Commit

Permalink
Merge pull request #9 from Oefenweb/consistency-changes
Browse files Browse the repository at this point in the history
Consistency changes
  • Loading branch information
tersmitten authored Aug 31, 2023
2 parents ab37b36 + ad5e814 commit c30a396
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 17 deletions.
1 change: 1 addition & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
warn_list:
- role-name
- name[play]
- name[casing]
11 changes: 5 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ jobs:
python-version: '3.x'

- name: Install test dependencies
run: pip install ansible-lint[community,yamllint]
run: |
pip install ansible-lint
ansible-galaxy install -r requirements.yml
- name: Lint code
run: |
Expand All @@ -43,11 +45,8 @@ jobs:
matrix:
include:
- distro: debian8
ansible-version: '<2.10'
- distro: debian9
- distro: debian10
- distro: ubuntu1604
ansible-version: '>=2.9, <2.10'
- distro: ubuntu1604
ansible-version: '>=2.10, <2.11'
- distro: ubuntu1604
Expand All @@ -66,14 +65,14 @@ jobs:
python-version: '3.x'

- name: Install test dependencies
run: pip install 'ansible${{ matrix.ansible-version }}' molecule[docker] docker
run: pip install 'ansible${{ matrix.ansible-version }}' molecule-plugins[docker] docker

- name: Run Molecule tests
run: |
molecule test
env:
ANSIBLE_FORCE_COLOR: '1'
ANSIBLE_VERBOSITY: '3'
ANSIBLE_VERBOSITY: '2'
MOLECULE_DEBUG: '1'
MOLECULE_DISTRO: "${{ matrix.distro }}"
PY_COLORS: '1'
2 changes: 1 addition & 1 deletion molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
become: true
pre_tasks:
- name: include vars

Check warning on line 6 in molecule/default/converge.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 6 in molecule/default/converge.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 6 in molecule/default/converge.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 6 in molecule/default/converge.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 6 in molecule/default/converge.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 6 in molecule/default/converge.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 6 in molecule/default/converge.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 6 in molecule/default/converge.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 6 in molecule/default/converge.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 6 in molecule/default/converge.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.
include_vars: "{{ playbook_dir }}/../../tests/vars/main.yml"
ansible.builtin.include_vars: "{{ playbook_dir }}/../../tests/vars/main.yml"
roles:
- ../../../
2 changes: 1 addition & 1 deletion tasks/groups-post.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# tasks file
---
- name: groups | delete (user)

Check warning on line 3 in tasks/groups-post.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/groups-post.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/groups-post.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/groups-post.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/groups-post.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/groups-post.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/groups-post.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/groups-post.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/groups-post.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/groups-post.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.
group:
ansible.builtin.group:
name: "{{ item.group | default(item.name) }}"
state: absent
with_items: "{{ user_users }}"
Expand Down
4 changes: 2 additions & 2 deletions tasks/groups-pre.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# tasks file
---
- name: groups | add / delete

Check warning on line 3 in tasks/groups-pre.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/groups-pre.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/groups-pre.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/groups-pre.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/groups-pre.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/groups-pre.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/groups-pre.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/groups-pre.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/groups-pre.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/groups-pre.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.
group:
ansible.builtin.group:
name: "{{ item.name }}"
system: "{{ item.system | default(false) }}"
gid: "{{ item.gid | default(omit) }}"
Expand All @@ -11,7 +11,7 @@
- user-groups-gid

- name: groups | add (user)

Check warning on line 13 in tasks/groups-pre.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 13 in tasks/groups-pre.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 13 in tasks/groups-pre.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 13 in tasks/groups-pre.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 13 in tasks/groups-pre.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 13 in tasks/groups-pre.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 13 in tasks/groups-pre.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 13 in tasks/groups-pre.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 13 in tasks/groups-pre.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 13 in tasks/groups-pre.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.
group:
ansible.builtin.group:
name: "{{ item.group | default(item.name) }}"
state: present
with_items: "{{ user_users }}"
Expand Down
9 changes: 6 additions & 3 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
# tasks file
---
- include: groups-pre.yml
- name: groups pre

Check warning on line 3 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.
ansible.builtin.import_tasks: groups-pre.yml
tags:
- configuration
- user
- user-groups
- user-groups-pre

- include: users.yml
- name: users

Check warning on line 11 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 11 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 11 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 11 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 11 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 11 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 11 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 11 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 11 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 11 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.
ansible.builtin.import_tasks: users.yml
tags:
- configuration
- user
- user-users

- include: groups-post.yml
- name: groups post

Check warning on line 18 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 18 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 18 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 18 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 18 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 18 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 18 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 18 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 18 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 18 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.
ansible.builtin.import_tasks: groups-post.yml
tags:
- configuration
- user
Expand Down
4 changes: 2 additions & 2 deletions tasks/users.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# tasks file
---
- name: users | add / delete

Check warning on line 3 in tasks/users.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/users.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/users.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/users.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/users.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/users.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/users.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/users.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/users.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 3 in tasks/users.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.
user:
ansible.builtin.user:
name: "{{ item.name }}"
uid: "{{ item.uid | default(omit) }}"
comment: "{{ item.comment | default('') }}"
Expand All @@ -21,7 +21,7 @@
- user-users-gid

- name: users | permissions

Check warning on line 23 in tasks/users.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 23 in tasks/users.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 23 in tasks/users.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 23 in tasks/users.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 23 in tasks/users.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 23 in tasks/users.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 23 in tasks/users.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 23 in tasks/users.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 23 in tasks/users.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 23 in tasks/users.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.
file:
ansible.builtin.file:
path: "{{ item.home | default(('/' if item.name == 'root' else '/home/') + item.name) }}"
mode: "{{ item.dir_mode }}"
state: directory
Expand Down
2 changes: 1 addition & 1 deletion tests/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
become: true
pre_tasks:
- name: include vars
include_vars: "{{ playbook_dir }}/vars/main.yml"
ansible.builtin.include_vars: "{{ playbook_dir }}/vars/main.yml"
roles:
- ../../
2 changes: 1 addition & 1 deletion tests/vagrant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
become: true
pre_tasks:
- name: include vars
include_vars: "{{ playbook_dir }}/vars/main.yml"
ansible.builtin.include_vars: "{{ playbook_dir }}/vars/main.yml"
roles:
- ../../

0 comments on commit c30a396

Please sign in to comment.