From d16d9a81e133bff6a547b99b9065e1361cb88f22 Mon Sep 17 00:00:00 2001 From: Uwe Arnold Date: Sun, 8 Jul 2018 00:15:07 +0200 Subject: [PATCH 1/4] Fix: ansible-galaxy minus to underscore --- .travis.yml | 22 ++++++++++++++-------- README.md | 14 +++++++------- meta/main.yml | 5 ++--- requirements.yml | 4 ++-- tests/test.yml | 2 +- 5 files changed, 26 insertions(+), 21 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6edf68b..7987460 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,29 +1,30 @@ --- -# TODO: Build better testing for multiple containers and os support language: python -python: "2.7" +python: + - "2.7" + - "3.6" sudo: false -# Install ansible +# Install python-pip addons: apt: packages: - python-pip + - aspell + - aspell-en install: # Install ansible - pip install ansible - pip install ansible-lint + - pip install ansible-review # Check ansible version - ansible --version - # Create ansible.cfg with correct roles_path - - printf '[defaults]\nroles_path=../' >ansible.cfg - # Link github repo to ansible-galaxy name - - ln -s $PWD ../while-true-do.yum-cron + - ln -s $PWD ../while_true_do.yum-cron # Run the tests script: @@ -33,4 +34,9 @@ script: - tests/test-spelling.sh notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ + webhooks: + urls: + - https://galaxy.ansible.com/api/v1/notifications/ + on_success: always + on_failure: never + on_pull_requests: false diff --git a/README.md b/README.md index e91661f..dc412df 100644 --- a/README.md +++ b/README.md @@ -9,16 +9,16 @@ Install and configure yum-cron to stay up to date. ## Installation -Install from [Ansible Galaxy](https://galaxy.ansible.com/while-true-do/yum-cron) +Install from [Ansible Galaxy](https://galaxy.ansible.com/while_true_do/yum-cron) ``` -ansible-galaxy install while-true-do.yum-cron +ansible-galaxy install while_true_do.yum-cron ``` Install from [Github](https://github.com/while-true-do/ansible-role-yum-cron) ``` -git clone https://github.com/while-true-do/ansible-role-yum-cron.git while-true-do.yum-cron +git clone https://github.com/while-true-do/ansible-role-yum-cron.git while_true_do.yum-cron ``` ## Requirements @@ -27,7 +27,7 @@ YUM must be /will be installed, of course. Its a good idea to configure yum, first. You will find an ansible role here: - + Used Modules: @@ -36,7 +36,7 @@ Used Modules: ## Dependencies -- [while-true-do.yum](https://galaxy.ansible.com/while-true-do/yum/) +- [while-true-do.yum](https://galaxy.ansible.com/while_true_do/yum/) ``` ansible-galaxy install -r requirements.yml @@ -98,7 +98,7 @@ Simple Example: ``` - hosts: servers roles: - - { role: while-true-do.yum-cron } + - { role: while_true_do.yum-cron } ``` Advanced Example: @@ -107,7 +107,7 @@ Advanced Example: # To enable E-Mail Notifications - hosts: servers roles: - - { role: while-true-do.yum-cron, wtd_yum_cron_emit_via: 'email', wtd_yum_cron_email_to: 'mymail@example.com' } + - { role: while_true_do.yum-cron, wtd_yum_cron_emit_via: 'email', wtd_yum_cron_email_to: 'mymail@example.com' } ``` ## Testing diff --git a/meta/main.yml b/meta/main.yml index 9f2b4fd..68243bb 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -1,12 +1,11 @@ -dependencies: ['while-true-do.yum'] +dependencies: ['while_true_do.yum'] galaxy_info: author: while-true-do.org description: A role to install and configure yum-cron. company: while-true-do.org - issue_tracker_url: https://github.com/while-true-do/ansible-role-yum-cron/issues - github_branch: master + github_branch: master license: BSD min_ansible_version: 2.0 diff --git a/requirements.yml b/requirements.yml index e8cb647..dd9b474 100644 --- a/requirements.yml +++ b/requirements.yml @@ -1,3 +1,3 @@ --- -# Install while-true-do.yum from galaxy -- src: while-true-do.yum +# Install while_true_do.yum from galaxy +- src: while_true_do.yum diff --git a/tests/test.yml b/tests/test.yml index 64c079a..ba16b8d 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -2,4 +2,4 @@ - hosts: localhost remote_user: root roles: - - while-true-do.yum-cron + - while_true_do.yum-cron From fc09177c1bf53e686c8747c996862e2ab99f328c Mon Sep 17 00:00:00 2001 From: Uwe Arnold Date: Wed, 18 Jul 2018 20:48:46 +0200 Subject: [PATCH 2/4] Polish: metadata --- .travis.yml | 2 +- LICENSE | 3 --- README.md | 10 ++++---- docs/CODE_OF_CONDUCT.md | 55 +++++++++++++++++++++++++++++++++++++++++ docs/COMMIT_TEMPLATE.md | 2 +- docs/CONTRIBUTING.md | 10 +++++--- meta/main.yml | 2 +- tests/test-ansible.sh | 16 ++++++------ tests/test-spelling.sh | 20 +++++++-------- update-meta-files.sh | 6 ++--- 10 files changed, 90 insertions(+), 36 deletions(-) create mode 100644 docs/CODE_OF_CONDUCT.md diff --git a/.travis.yml b/.travis.yml index 7987460..bb231be 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ --- language: python -python: +python: - "2.7" - "3.6" diff --git a/LICENSE b/LICENSE index 3ea1a7a..f9abebb 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,3 @@ ------------------- -BSD 3 Clause ------------------- Copyright (c) 2018, While True Do All rights reserved. diff --git a/README.md b/README.md index dc412df..98fb44c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Build Status](https://travis-ci.org/while-true-do/ansible-role-yum-cron.svg?branch=master)](https://travis-ci.org/while-true-do/ansible-role-yum-cron) -# Ansible Role: yum-cron +# Ansible Role: yum-cron | A role to install and configure yum-cron ## Motivation @@ -24,7 +24,7 @@ git clone https://github.com/while-true-do/ansible-role-yum-cron.git while_true_ ## Requirements YUM must be /will be installed, of course. -Its a good idea to configure yum, first. +Its a good idea to configure yum, first. You will find an ansible role here: @@ -96,7 +96,7 @@ wtd_yum_cron_hourly_output_width: '80' Simple Example: ``` -- hosts: servers +- hosts: servers roles: - { role: while_true_do.yum-cron } ``` @@ -105,7 +105,7 @@ Advanced Example: ``` # To enable E-Mail Notifications -- hosts: servers +- hosts: servers roles: - { role: while_true_do.yum-cron, wtd_yum_cron_emit_via: 'email', wtd_yum_cron_email_to: 'mymail@example.com' } ``` @@ -125,7 +125,7 @@ bash ./tests/test-ansible.sh ## Contribute / Bugs Thank you so much for considering to contribute. Every contribution helps us. -We are really happy, when somebody is joining the hard work. Please have a look +We are really happy, when somebody is joining the hard work. Please have a look at the links first. - [Contribution Guidelines](./docs/CONTRIBUTING.md) diff --git a/docs/CODE_OF_CONDUCT.md b/docs/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..19565f0 --- /dev/null +++ b/docs/CODE_OF_CONDUCT.md @@ -0,0 +1,55 @@ +# Code of Conduct +| While True Do Code of Conduct + +This guideline is only a snapshot. Please have a look [here](https://github.com/while-true-do/community/docs/) to check the latest version. + +## Welcome + +Welcome to While True Do. Thank you so much for considering to participate to our community and projects. + +In this document you can find some guidance how we take care and what we expect from our maintainers and contributors. + +## Contents + +- [Vision](#Vision) +- [Standards](#Standards) +- [Responsibility](#Responsibility) +- [Enforcement](#Enforcement) +- [Attribution](#Attribution) + +## Vision + +We as contributors and maintainers want to establish a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Standards + +Examples of behaviour that contributes to creating a positive environment: + +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members + +Examples of unacceptable behaviour by participants: + + +- The use of sexualized language or imagery and unwelcome sexual attention or advances +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others’ private information, such as a physical or electronic address, without explicit permission + +## Responsibility + +Project maintainers are responsible for clariying the standards of acceptable behaviour. They are expected to take corrective action in response to any instances of unacceptable behaviour. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to the Code of Conduct. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at hello@while-true-do.org. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project’s leadership. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at diff --git a/docs/COMMIT_TEMPLATE.md b/docs/COMMIT_TEMPLATE.md index 7c26738..7115199 100644 --- a/docs/COMMIT_TEMPLATE.md +++ b/docs/COMMIT_TEMPLATE.md @@ -32,7 +32,7 @@ Further paragraphs come after blank lines, if needed. - Bullet points are okay, too. - A hyphen or asterisk is used for the bullet, preceded by a single space and can be wrapped around. - + - Resolves: #12 - See also: #33, #44 ``` diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 14cab13..2195553 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -1,6 +1,8 @@ -# Contribution Guidelines +# Contribution Code +| While True Do Contribution Guidelines -This guideline is only a snapshot. Please have a look [here](https://github.com/while-true-do/community/docs/) to check the latest version. + +This guideline is only a snapshot. Please have a look [here](https://github.com/while-true-do/community/blob/master/docs/CONTRIBUTING.md) to check the latest version. ## Welcome @@ -15,14 +17,14 @@ In this document you can find some guidance, how you can take care of bugs, subm - [Submit Changes and Pull Requests](#Submit-Changes-and-Pull-Requests) - [Documentation](#Documentation) - [Testing](#Testing) - + ## Resources - Documents: - Issue tracker: linked in every [README.md](../README.md) - Website: - Github: -- Communication: mail@while-true-do.org +- Communication: hello@while-true-do.org ## Report Bugs and Requests diff --git a/meta/main.yml b/meta/main.yml index 68243bb..f0d5a21 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -5,7 +5,7 @@ galaxy_info: description: A role to install and configure yum-cron. company: while-true-do.org - github_branch: master + github_branch: master license: BSD min_ansible_version: 2.0 diff --git a/tests/test-ansible.sh b/tests/test-ansible.sh index b178ae0..11fcd1f 100644 --- a/tests/test-ansible.sh +++ b/tests/test-ansible.sh @@ -40,16 +40,16 @@ printf "**************************************** \n" if [ $WTD_ERR ]; then printf "$WTD_COLOR_RED - **************************************** \n\ - *** Error occured - Tests failed *** \n\ - **************************************** \n\ +**************************************** \n\ +*** Error occured - Tests failed *** \n\ +**************************************** \n\ $WTD_COLOR_OFF" exit 1 else - printf " - **************************************** \n\ - *** Tests successful *** \n\ - **************************************** \n\ - " + printf "$WTD_COLOR_GREEN +**************************************** \n\ +*** Tests successful *** \n\ +**************************************** \n\ + $WTD_COLOR_OFF" exit 0 fi diff --git a/tests/test-spelling.sh b/tests/test-spelling.sh index 36f1ab8..a523229 100644 --- a/tests/test-spelling.sh +++ b/tests/test-spelling.sh @@ -23,19 +23,19 @@ BADWORDS_COUNT=$(echo $BADWORDS | wc -w) if [ $BADWORDS_COUNT -gt 0 ]; then printf "$WTD_COLOR_RED - Error occured - Found $BADWORDS_COUNT bad word(s) \n\ - \n\ - Bad Words: \n\ - $BADWORDS \n\ - \n\ - **************************************** \n\ - $WTD_COLOR_OFF" +Error occured - Found $BADWORDS_COUNT bad word(s) \n\ +\n\ +Bad Words: \n\ +$BADWORDS \n\ +\n\ +**************************************** \n\ +$WTD_COLOR_OFF" exit 1; else printf "$WTD_COLOR_GREEN - **************************************** \n\ - *** Spellchecking successful *** \n\ - **************************************** \n\ +**************************************** \n\ +*** Spellchecking successful *** \n\ +**************************************** \n\ $WTD_COLOR_OFF" exit 0; fi diff --git a/update-meta-files.sh b/update-meta-files.sh index 626dec7..f0d3b4e 100644 --- a/update-meta-files.sh +++ b/update-meta-files.sh @@ -1,8 +1,8 @@ #!/bin/bash # # Description: -# update-skeleton.sh is a very minimal script to update the skeleton with -# some additional content from while-true-do.org. It will not remove files, +# update-skeleton.sh is a very minimal script to update the skeleton with +# some additional content from while-true-do.org. It will not remove files, # you created. Replacement must be acknowledged. function usage { @@ -90,7 +90,7 @@ function update_all { } while getopts 'admst' opts; do - + case "${opts}" in a) update_all ;; d) update_docs ;; From ab61d6fee4f616adb63f94e34070bc41591381e0 Mon Sep 17 00:00:00 2001 From: Uwe Arnold Date: Wed, 18 Jul 2018 20:49:12 +0200 Subject: [PATCH 3/4] Add: role_name attribute --- meta/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/main.yml b/meta/main.yml index f0d5a21..a8069fc 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -1,6 +1,7 @@ dependencies: ['while_true_do.yum'] galaxy_info: + role_name: yum_cron author: while-true-do.org description: A role to install and configure yum-cron. company: while-true-do.org From e7134b1864b905e8524c48fd2b3cd0664fe5900c Mon Sep 17 00:00:00 2001 From: Uwe Arnold Date: Sat, 11 Aug 2018 16:28:25 +0200 Subject: [PATCH 4/4] Polish: metadata --- .travis.yml | 2 +- README.md | 6 ++-- docs/CODE_OF_CONDUCT.md | 3 +- docs/COMMIT_TEMPLATE.md | 10 +++--- docs/CONTRIBUTING.md | 1 - docs/ISSUE_TEMPLATE.md | 6 ++-- docs/PULL_REQUEST_TEMPLATE.md | 10 ++++-- meta/main.yml | 3 +- tests/.aspell.en.pws | 1 + tests/test-ansible.sh | 59 +++++++++++++++++++---------------- tests/test-spelling.sh | 50 +++++++++++++++-------------- tests/test-whitespace.sh | 50 +++++++++++++++++++++++++++++ tests/test.yml | 2 +- update-meta-files.sh | 8 ++--- 14 files changed, 139 insertions(+), 72 deletions(-) create mode 100644 tests/test-whitespace.sh diff --git a/.travis.yml b/.travis.yml index bb231be..b28cd8a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ install: - ansible --version # Link github repo to ansible-galaxy name - - ln -s $PWD ../while_true_do.yum-cron + - ln -s $PWD ../while_true_do.yum_cron # Run the tests script: diff --git a/README.md b/README.md index 98fb44c..96e0389 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Install and configure yum-cron to stay up to date. ## Installation -Install from [Ansible Galaxy](https://galaxy.ansible.com/while_true_do/yum-cron) +Install from [Ansible Galaxy](https://galaxy.ansible.com/while_true_do/yum_cron) ``` ansible-galaxy install while_true_do.yum-cron @@ -98,7 +98,7 @@ Simple Example: ``` - hosts: servers roles: - - { role: while_true_do.yum-cron } + - { role: while_true_do.yum_cron } ``` Advanced Example: @@ -107,7 +107,7 @@ Advanced Example: # To enable E-Mail Notifications - hosts: servers roles: - - { role: while_true_do.yum-cron, wtd_yum_cron_emit_via: 'email', wtd_yum_cron_email_to: 'mymail@example.com' } + - { role: while_true_do.yum_cron, wtd_yum_cron_emit_via: 'email', wtd_yum_cron_email_to: 'mymail@example.com' } ``` ## Testing diff --git a/docs/CODE_OF_CONDUCT.md b/docs/CODE_OF_CONDUCT.md index 19565f0..5681a38 100644 --- a/docs/CODE_OF_CONDUCT.md +++ b/docs/CODE_OF_CONDUCT.md @@ -1,7 +1,7 @@ # Code of Conduct | While True Do Code of Conduct -This guideline is only a snapshot. Please have a look [here](https://github.com/while-true-do/community/docs/) to check the latest version. +This guideline is only a snapshot. Please have a look [here](https://github.com/while-true-do/community/tree/master/docs) to check the latest version. ## Welcome @@ -32,7 +32,6 @@ Examples of behaviour that contributes to creating a positive environment: Examples of unacceptable behaviour by participants: - - The use of sexualized language or imagery and unwelcome sexual attention or advances - Trolling, insulting/derogatory comments, and personal or political attacks - Public or private harassment diff --git a/docs/COMMIT_TEMPLATE.md b/docs/COMMIT_TEMPLATE.md index 7115199..04e62fd 100644 --- a/docs/COMMIT_TEMPLATE.md +++ b/docs/COMMIT_TEMPLATE.md @@ -1,8 +1,8 @@ ### Type of Report @@ -20,4 +22,4 @@ https://github.com/while-true-do/community/docs/CONTRIBUTING.md ### Attachments - + diff --git a/docs/PULL_REQUEST_TEMPLATE.md b/docs/PULL_REQUEST_TEMPLATE.md index 127a7de..ccb6f45 100644 --- a/docs/PULL_REQUEST_TEMPLATE.md +++ b/docs/PULL_REQUEST_TEMPLATE.md @@ -1,24 +1,30 @@ + # Subject of max. 50 characters + + ## Reference + + - Resolves: #12, #13 - See also: #33, #44 ## (Optional) People +