From 96037aff157a60a0f9c4d2a8faa3887cacbe568f Mon Sep 17 00:00:00 2001 From: Noriko Hosoi Date: Mon, 16 Jan 2023 13:41:45 -0800 Subject: [PATCH 1/2] 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 --- .wokeignore | 2 ++ CHANGELOG.md | 4 ++-- README.md | 4 +++- examples/simple.yml | 39 ++++++++++++++++++----------------- tests/tests_global_config.yml | 2 ++ 5 files changed, 29 insertions(+), 22 deletions(-) create mode 100644 .wokeignore diff --git a/.wokeignore b/.wokeignore new file mode 100644 index 00000000..20ad7553 --- /dev/null +++ b/.wokeignore @@ -0,0 +1,2 @@ +.dev-tools/options_body +templates/ssh_config.j2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f47716b..f4121ff5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 -------------------- @@ -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 diff --git a/README.md b/README.md index 70eac408..08962ec6 100644 --- a/README.md +++ b/README.md @@ -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 + 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 @@ -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: diff --git a/examples/simple.yml b/examples/simple.yml index c97d3c1f..f50e3050 100644 --- a/examples/simple.yml +++ b/examples/simple.yml @@ -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 diff --git a/tests/tests_global_config.yml b/tests/tests_global_config.yml index 64e14c3a..f6989b7f 100644 --- a/tests/tests_global_config.yml +++ b/tests/tests_global_config.yml @@ -19,6 +19,7 @@ ssh: Compression: true GSSAPIAuthentication: false + # wokeignore:rule=master ControlMaster: auto ControlPath: ~/.ssh/.cm%C Match: @@ -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" From 046a2611abdb985803a40cff9ea14a066a0bf897 Mon Sep 17 00:00:00 2001 From: Noriko Hosoi Date: Thu, 26 Jan 2023 11:27:18 -0800 Subject: [PATCH 2/2] 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 --- .github/workflows/woke.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/woke.yml diff --git a/.github/workflows/woke.yml b/.github/workflows/woke.yml new file mode 100644 index 00000000..6752ff54 --- /dev/null +++ b/.github/workflows/woke.yml @@ -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