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

use ca_password from variable(--extra-vars) - non-interactive installation using ansible playbook #1774

Merged
merged 3 commits into from
Apr 25, 2020

Conversation

saravanan30erd
Copy link
Contributor

@saravanan30erd saravanan30erd commented Apr 18, 2020

use ca_password from variable in non-interactive installation using ansible playbook.

Description

https://github.com/trailofbits/algo/blob/master/docs/deploy-from-ansible.md#local-installation

I tried the algo installation non-interactively using ansible-playbook command directly as per the above documentation.

I noticed even if we set ca_password variable in ansible --extra-vars it still using the auto generated password for CA password.

ansible-playbook main.yml -e "provider=local server=localhost endpoint=<public IP of VPN server> ca_password=xxxxxx"

Motivation and Context

It will use ca_password from variables if this variable has passed from --extra-vars or variable config file and only use auto-generated password if there is no ca_password variable configured.

It will enable users to provide ca_password when using non-interactive installation method.

How Has This Been Tested?

  • added test script to test this fix.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • [] My change requires a change to the documentation.
  • [] I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@CLAassistant
Copy link

CLAassistant commented Apr 18, 2020

CLA assistant check
All committers have signed the CLA.

@saravanan30erd saravanan30erd changed the title use ca_password from variable use ca_password from variable - non-interactive installation using ansible playbook Apr 18, 2020
@jackivanov
Copy link
Collaborator

jackivanov commented Apr 18, 2020

Actually extra vars always win precedence, so you can just pass CA_password. Can you try if that works for you please?

@saravanan30erd
Copy link
Contributor Author

saravanan30erd commented Apr 18, 2020

@jackivanov

But the below document says to use ca_password in extra-var but it is not working as there is no check for ca_password var in installation process.
https://github.com/trailofbits/algo/blob/master/docs/deploy-from-ansible.md#local-installation

However if we use ca_password in extra-var for user adding script users.yml it is working. Only problem is, ca_password in extra-var is not working in installation script main.yml and added one small check to fix this issue.

@saravanan30erd saravanan30erd changed the title use ca_password from variable - non-interactive installation using ansible playbook use ca_password from variable(--extra-vars) - non-interactive installation using ansible playbook Apr 18, 2020
@jackivanov jackivanov merged commit 02fe2f7 into trailofbits:master Apr 25, 2020
davedittrich pushed a commit to davedittrich/algo that referenced this pull request Sep 25, 2020
…ation using ansible playbook (trailofbits#1774)

* use ca_password from variable

* add tests to cover the changes

* update tests - PR trailofbits#1774
foodneutrino pushed a commit to foodneutrino/algo that referenced this pull request Sep 19, 2021
…ation using ansible playbook (trailofbits#1774)

* use ca_password from variable

* add tests to cover the changes

* update tests - PR trailofbits#1774
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.

3 participants