-
-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: introduce unit testing of roles with Molecule #162
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @strus38,
Thank you for the PR. That's a huge work.
Almost all molecule test will failed if run automatically since roles needs some rework especially on default values, but this should be part of separated PR.
Indeed this is something I noticed a couple of days ago, most if not all of our default parameters are not defined in defaults/main.yml
. PRs should come soon.
Force LF instead of CRLF
Do you mean force CRLF instead of LF? It looks like you changed line-endings from LF to CRLF. Anyway, you can't change the line-endings like that, it would need to be discussed first. :-)
Remove unecessary empty lines to pass the linter phase
Nice catch! Our static code analysis runs ansible-lint, but not yamllint. It may need a separate PR however. (check fc2f313 to see how I made ansible-lint happy before enabling static code analysis)
Overall this is very interesting and I will test this as soon as possible! I'm wondering if it could be easier to introduce support of molecule with a single role first, to see how it behaves and how we can integrate it with GitHub actions.
Also, I don't understand why the test_hosts_file(host)
is defined in all the modules?
Finally, you need to configure your git (Author is root <root@LAPTOP-063FLOTR.localdomain>
):
$ git commit --amend --author="Author Name <email@address.com>" --no-edit
By the way, the cause of the conflicts is because your commit is not on top of master:
|
I had to do a dos2unix on all files to have the linter working.
Clear for the master branch, normally I never work on the master branch,
since for me it should always be reflecting the last stable version.
I will change my name.
Thanks
Le sam. 11 avr. 2020 à 00:46, Bruno <notifications@github.com> a écrit :
… By the way, the cause of the conflicts is because your commit is not on
top of master:
$ git log --oneline --no-merges --name-only strus38/feature/molecule..master
629db3f (HEAD -> master, origin/master, origin/HEAD) [advanced_dhcp_sever] remove references to ntp_ip variable (#153)
resources/documentation/configure_bluebanquise.rst
resources/examples/multi_icebergs_cluster/inventory/group_vars/all/networks/ice1-1.yml
resources/examples/multi_icebergs_cluster/inventory/group_vars/all/networks/ice2-1.yml
resources/examples/multi_icebergs_cluster/inventory/group_vars/all/networks/ice3-1.yml
resources/examples/multi_icebergs_cluster/inventory/group_vars/all/networks/ice3-2.yml
roles/advanced-core/advanced_dhcp_server/templates/dhcpd.networks.conf.j2
3a34479 fix: install jinja2 macros in rpm
bluebanquise.spec
fed7da3 fix: require clustershell in specfile
bluebanquise.spec
f7ffaf0 Fix: Adding missing role Ansible
roles/core/ansible/readme.rst
roles/core/ansible/tasks/main.yml
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#162 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABM6DUYU6SONGUKXXK5JLALRL6OWBANCNFSM4MFTDZDA>
.
|
Hi I fixed some of your requests:
If that is all, I guess you can attempt another review. Thanks. |
Note: on windows10 WSL running Ubuntu 18.04, you must define in your Ubuntu bash: So I am reworking the PR to just validate the approach on 2 roles. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice change, thanks!
Until now, we were defining default values in the examples inventories. This PR demonstrates we should use Ansible Roles mechanism and define the default values in the role (defaults/main.yml
). Will add some reviewers to get feedback.
Fixed all the remarks. Should be ok now. Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're almost done!
I noticed an issue with the chrony.conf.j2 template (in current implementation, not introduced by this PR). Please revert your changes to this file, I will open a ticket to fix this.
Also:
- no need to check if
time_zone is defined
since it now has a default value. - fedora is not supported
Thank you for the huge work on this.
…m travis build, remove the check to time_zone variable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✌️ 👍 Nice! Needs a second review before squash & merge.
Note: I have just completed a new github projet: docker-ubi7-ansible so we will be able to update travis config with ubi7 images. |
Hello, Thank you for this PR. Have a nice weekend Ox |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this PR. Many nice quality improvement. :-)
Please have a look on my comments regarding defaults.
Fixed the PR as suggested by comments. Please review again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good for me.
all fixed I guess. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok for me, many thanks for this huge work.
time
anddns_server