Skip to content
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

Feature/ansible version update #137

Merged
merged 4 commits into from
Oct 8, 2020
Merged

Conversation

laurentganne
Copy link
Contributor

@laurentganne laurentganne commented Oct 7, 2020

Pull Request description

Description of the change

Following Yorc use of Ansible 2.10 to address issue (GH-648),
updated playbooks to remove deprecation warnings and fix what was already deprecated in previous versions and has been removed in Ansible 2.10

What I did

org/ystia/ansible/linux/ansible/playbooks/create.yml
python_requirements_facts is now python_requirements_info.
paramiko was removed from Ansible requirements.txt and has now to be installed separately.

org/ystia/dns/dnsmasq/ansible/playbooks/roles/jriguera.dnsmasq/tasks/install.yml
Not anymore able to use Jinja tests as filters like changed or match
=> replace: when: value|changed by when: value is changed

org/ystia/experimental/consul/linux/ansible/playbooks/consul_configure.yaml
Jinja test match cannot be used anymore as filter.
Parameter subjectAltName must be used in opensl_csr, not in openssl_certificate

org/ystia/experimental/consul/linux/ansible/playbooks/consul_connects_agent_to_server.yml
org/ystia/experimental/consul/linux/ansible/playbooks/consul_connects_servers_wan.yaml
Jinja test match cannot be used anymore as filter.

org/ystia/experimental/consul/linux/ansible/playbooks/consul_install.yaml
python_requirements_facts is now python_requirements_info.
Fixed a warning asking to define groups for a user.

org/ystia/experimental/consul/linux/ansible/playbooks/roles/jriguera.dnsmasq/tasks/install.yml
org/mongodb/linux/ansible/playbooks/roles/undergreen.ansible-role-mongodb/tasks/configure.yml
Jinja test changed cannot be used anymore as filter.

org/ystia/slurm/ansible/playbooks/install-RedHat.yml
Invoking "yum" or apt only once while using a loop via squash_actions is deprecated

org/ystia/ssl/ansible-ssl-certificates/playbooks/configure.yml
Parameter subjectAltName must be used in opensl_csr, not in openssl_certificate

org/ystia/terraform/linux/ansible/playbooks/create.yml
Invoking "yum" or apt only once while using a loop via squash_actions is deprecated

org/ystia/yorc/alien4cloud-yorc-provider/playbook/connect_yorc.yml
Using here a dpeprecated feature relying on pyopenssl instead of cryptography, otherwise certficates generated were causing exceptions like this one:

      org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'yorcOrchestrator': Unsatisfied dependency expressed through field 'templateManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'templateManager': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: unknown object in getInstance: org.bouncycastle.asn1.DEROctetString
              at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588)
...
      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'templateManager': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: unknown object in getInstance: org.bouncycastle.asn1.DEROctetString
              at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:137)
...
      Caused by: java.lang.IllegalArgumentException: unknown object in getInstance: org.bouncycastle.asn1.DEROctetString
              at org.bouncycastle.asn1.ASN1Sequence.getInstance(Unknown Source)
              at org.bouncycastle.asn1.pkcs.PrivateKeyInfo.getInstance(Unknown Source)
              at alien4cloud.paas.yorc.context.rest.TemplateManager.createKeystore(TemplateManager.java:208)
              at alien4cloud.paas.yorc.context.rest.TemplateManager.configure(TemplateManager.java:105)

org/ystia/yorc/alien4cloud-yorc-provider/playbook/create_orchestrator.yml
org/ystia/yorc/alien4cloud/playbook/create_orchestrator.yml
Ansible uri parameter HEADER_* is removed
=> replace HEADER_cookie and HEADER_Content-Type by:

    headers:
      Cookie: xxx
      Content-Type: yyy

org/ystia/yorc/yorc/linux/ansible/playbooks/configure.yml
Parameter subjectAltName must be used in opensl_csr, not in openssl_certificate

How to verify it

Changes are incorporated in yorc toca_types.zip in pull request ystia/yorc#686
and can be used performing a bootstrap of yorc.

Description for the changelog

Update Ansible to 2.10 (GH-136)

Applicable Issues

Fixes #136

Copy link
Member

@loicalbertin loicalbertin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, did you try ansible implementations that are not used in Yorc bootstrap?

@loicalbertin
Copy link
Member

In a future component or feature on an ansible component we should consider integrating ansible-lint to our CI.

@laurentganne
Copy link
Contributor Author

Looks good, did you try ansible implementations that are not used in Yorc bootstrap?

No, I tried only the ones used in bootstrap (not mogodb, and slurm)

@laurentganne laurentganne merged commit cf102a7 into develop Oct 8, 2020
@laurentganne laurentganne deleted the feature/ansible-version-update branch October 8, 2020 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Ansible to 2.10
2 participants