Skip to content

Commit

Permalink
Add check for non-inclusive language (#64)
Browse files Browse the repository at this point in the history
* Clean up / Workaround non-inclusive words

- CHANGELOG.md
- README.md
- examples/simple.yml
- tests/tests_global_config.yml

Add .wokeignore for .dev-tools/options_body and templates/ssh_config.j2

Fix a yamllint failure and a typo.

Signed-off-by: Noriko Hosoi <[email protected]>

* Add check for non-inclusive language

Add a check for usage of terms and language that is considered
non-inclusive. We are using the woke tool for this with a wordlist
that can be found at
https://github.com/linux-system-roles/tox-lsr/blob/main/src/tox_lsr/config_files/woke.yml

Signed-off-by: Noriko Hosoi <[email protected]>

---------

Signed-off-by: Noriko Hosoi <[email protected]>
  • Loading branch information
nhosoi authored Jan 27, 2023
1 parent 957afda commit bda33d1
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 22 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/woke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# yamllint disable rule:line-length
name: Check for non-inclusive language
on: # yamllint disable-line rule:truthy
- pull_request
jobs:
woke:
name: woke
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: woke
uses: get-woke/woke-action@v0
with:
woke-args: "-c https://raw.githubusercontent.com/linux-system-roles/tox-lsr/main/src/tox_lsr/config_files/woke.yml"
# Cause the check to fail on any broke rules
fail-on-error: true
2 changes: 2 additions & 0 deletions .wokeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.dev-tools/options_body
templates/ssh_config.j2
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ it is converted to string.

### Other Changes

- changelog_to_tag action - support other than "master" for the main branch name, as well (#46)
- changelog_to_tag action - github action ansible test improvements (#46)

[1.1.8] - 2022-07-19
--------------------
Expand Down Expand Up @@ -253,7 +253,7 @@ must be a `string` value like `"2.9"`, not a `float` value like `2.9`.
### Other Changes

- Remove python-26 environment from tox testing
- update to tox-lsr 2.4.0 - add support for ansible-test sanity with docker
- update to tox-lsr 2.4.0 - add support for ansible-test with docker
- CI: Add support for RHEL-9

[1.0.0] - 2021-02-12
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ none

## Example Playbook

The folowing playbook configures the `root` user ssh configuration in his
The following playbook configures the `root` user ssh configuration in his
<!--- wokeignore:rule=master -->
home directory to use compression, control-master multiplexing and enable
GSSAPI authentication in the "match final all" block. Additionally, it
creates alias "example" for connecting to the example.com host as a user
Expand All @@ -103,6 +104,7 @@ somebody. The last line disables X11 forwarding.
ssh_user: root
ssh:
Compression: true
# wokeignore:rule=master
ControlMaster: auto
ControlPath: ~/.ssh/.cm%C
Match:
Expand Down
39 changes: 20 additions & 19 deletions examples/simple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,23 @@
- name: Example playbook for configuring ssh clients
hosts: all
tasks:
- name: Configure ssh clients
include_role:
name: linux-system-roles.ssh
vars:
ssh_user: root
ssh:
# noqa var-naming
Compression: true
GSSAPIAuthentication: false
ControlMaster: auto
ControlPath: ~/.ssh/.cm%C
Match:
- Condition: "final all"
GSSAPIAuthentication: true
Host:
- Condition: example
Hostname: example.com
User: somebody
ssh_ForwardX11: false
- name: Configure ssh clients
include_role:
name: linux-system-roles.ssh
vars:
ssh_user: root
ssh:
# noqa var-naming
Compression: true
GSSAPIAuthentication: false
# wokeignore:rule=master
ControlMaster: auto
ControlPath: ~/.ssh/.cm%C
Match:
- Condition: "final all"
GSSAPIAuthentication: true
Host:
- Condition: example
Hostname: example.com
User: somebody
ssh_ForwardX11: false
2 changes: 2 additions & 0 deletions tests/tests_global_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
ssh:
Compression: true
GSSAPIAuthentication: false
# wokeignore:rule=master
ControlMaster: auto
ControlPath: ~/.ssh/.cm%C
Match:
Expand Down Expand Up @@ -58,6 +59,7 @@
that:
- "'Compression yes' in config.content | b64decode"
- "'GSSAPIAuthentication no' in config.content | b64decode"
# wokeignore:rule=master
- "'ControlMaster auto' in config.content | b64decode"
- "'ControlPath ~/.ssh/.cm%C' in config.content | b64decode"
- "'Match all' in config.content | b64decode"
Expand Down

0 comments on commit bda33d1

Please sign in to comment.