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
Add nbde_client role #3
Add nbde_client role #3
Conversation
9adac40
to
da6ceb6
Compare
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.
|
Also, please review the travis CI test failures |
Yeah, this seems more complex to get running correctly. I would appreciate help here. |
|
Thanks for the first review, @richm; I will update this shortly. |
da6ceb6
to
eb09539
Compare
If you just want to skip For black - if you want black to format your code - edit then run You can also review the linter issues - you can edit the various config files to completely disable that particular issue (e.g. disabling line length checking is probably the biggest one). The config.sh variables such as You can also use code comments to suppress specific occurrences. |
eb09539
to
0ac915b
Compare
|
@richm: I have removed the pytest test for now and added playbook-based tests. I will work on pytest next week. I believe this should be ready for review now. |
c8a0526
to
c589b3b
Compare
Pin was a leftover nomenclature from clevis.
Also updates documentation/examples/tests accordingly.
Update documentation/examples/tests accordingly.
README.md
Outdated
| `nbde_client_bindings` is a list of dictionaries that support the following keys: | ||
| | **Name** | **Default/Choices** | **Description** | | ||
| |----------|-------------|------| | ||
| | `device` | | specifies the path of the backing of an encrypted device in the managed host. This device must be already configured as a LUKS device before using the role (**REQUIRED**). | |
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.
"of the backing" - backing what? shouldn't it read "of the backing device"?
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.
@dwlehman what do you think?
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.
I updated this to use "of the backing device"
To be consistent across our other system roles (e.g. storage)
It now refers to the README, which is the actual documentation.
No need to have __nbde_client_managed_dir anymore.
| --- | ||
| - name: Include general tests variables | ||
| include_vars: main.yml | ||
|
|
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.
prefer only 1 empty line between tasks instead of 2
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.
is there a way to enforce this in yamllint?
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.
is there a way to enforce this in yamllint?
not sure - will investigate
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.
hmm - I don't think this is a yaml thing, I think it is an ansible thing - https://docs.ansible.com/ansible-lint/ doesn't seem to have a check for that @pcahyna @tyll do you know if there is a linter for this? OTOH, I don't recall if 'one blank line between tasks' is in any of the best practices, but it is a common convention.
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.
I hear about this for the first time. Would be great to have a linter or actually formatter for this.
Remove extra new lines
| state: present | ||
|
|
||
|
|
||
| - name: Prepare key files, perform clevis operations and dispose of key files |
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.
Is this role idempotent? If you run the role again with the same nbde_client_bindings, will it do all of these steps again, and report that something changed? If so, I'm not sure how to prevent that from happening - how would you know ahead of time that you have already brought the managed hosts to the desired state? I realize it may be a little late for this particular PR, and I apologize for not noticing this sooner, so perhaps we can address this in a subsequent PR if necessary.
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.
Not fully. We discovered an issue with at least passphrase_temporary, which will be addressed after the initial merge.
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.
passphrase_etmporary -> passphrase_temporary
For increased security.
No description provided.