-
Notifications
You must be signed in to change notification settings - Fork 148
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
Rsponholtz patch 1 #480
Closed
Closed
Rsponholtz patch 1 #480
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Provide several fixes for Terraform code * Fix internet check * Fix owner of BOM directories * Ignore PyCache directories * Remove become from SDAF deployer check * Bugfix dns_info_loadbalancers output variable for app_tier * Add become to App installation block for Linux * Create compact-sap-c++-10 symlink owner and group on the symlink, not the src file The /opt/rh/SAP/lib64/compat-sap-c++-10.so src is provided by a Red Hat RPM. The owner / group should stay the same. * sapmnt shouldn't be created on HANA systems --------- Co-authored-by: Marges, RSY (Rick) <[email protected]> Co-authored-by: Harm Jan Stam <[email protected]>
* Remove unsupported warn parameter from tasks The warn parameter isn't supported anymore with newer Ansible versions. * Bugfix grub config file content The lookup module is executed on the controller and not on the remote host. Replace the lookup with a slurp. * Bugfix BOM aggregate only find local bom folders * Refactor curl command for Azure instance metadata to Ansible uri module The Ansible uri module recognizes the json output returned by the azure metadata instance api. No converting to json is therefore needed anymore. * Refactor anydb_node dns_info_vms output * Remove how file
…#476) * Fix DB2 for installation to lowercase db2sid folder * Add input API variable for ABAP connect user
the previous code would strip the end-of-line character on the end of the private key from keyvault, resulting in the automation failing to ssh to the managed servers. These options were added in ansible 2.8: https://docs.ansible.com/ansible/devel/collections/ansible/builtin/command_module.html
Hi @rsponholtz , thank you for the PR. Could you target the experimental branch for the PR please. |
These changes should be included in SDAF - Release 3.9.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
When retrieving SSH keys from keyvault, the end of line character at the end was removed, resulting in an invalid key format. It appears that this is true for Ansible 2.8+. If earlier versions of ansible are still supported, this may cause an issue.
Solution
Ansible 2.8 adds the stdin_add_newline and strip_empty_ends to the ansible.builtin.command module: https://docs.ansible.com/ansible/devel/collections/ansible/builtin/command_module.html
please set stdin_add_newline to be true, since you can have newlines at the end of a private key, and set
strip_empty_ends to be false.
while stdin_add_newline should default to true, and strip_empty_ends also defaults to true according to the doc, the command will actially strip the newline from the end if neither of those parameters are set.
Tests
create a workspace dir, create the sap-parameters.yaml in that with the following content:
use the kv that you're actually using. log onto azure CLI with
run the ansible using
Notes
since these options were added in ansible 2.8, if earlier versions are supported it may be nessesary to check the ansible version and use/not use the options