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

(CAT-372) - add var support to vagrant provisioner #264

Merged
merged 4 commits into from
May 16, 2024

Conversation

jordanbreen28
Copy link
Contributor

@jordanbreen28 jordanbreen28 commented May 15, 2024

Summary

To use multi-node provisioning locally with vagrant we need to be able to
assign arbitrary tags to the nodes we deploy.
Other provisioners do this with a parameter called vars.

This PR introduces support for this, and essentially copies what is
already present in the other bolt tasks in this module.

Additional Context

Litmus

bundle exec rake 'litmus:provision[vagrant, generic/debian10, role: worker1]'

Bolt

bundle exec bolt task run provision::vagrant --targets localhost  action=provision platform=generic/debian10 vars='role: worker1'

Will return an inventory file like


  - uri: 127.0.0.1:2200
    config:
      transport: ssh
      ssh:
        user: vagrant
        host: 127.0.0.1
        host-key-check: false
        port: 2200
        run-as: root
        connect-timeout: 120
        private-key: "path/vagrant.key.ed25519"
    facts:
      provisioner: vagrant
      platform: generic/debian10
      id: 57169c9e3f884f0dbe94dc26cdd8b7f0
      vagrant_env: "path/.vagrant/generic-debian10-6"
    vars:
      role: worker1

Related Issues (if any)

Mention any related issues or pull requests.

Checklist

  • 🟢 Spec tests.
  • 🟢 Acceptance tests.
  • Manually verified.

To use multi-node provisioning locally with vagrant we need to be able to
assign arbitrary tags to the nodes we deploy.
Other provisioners do this with a parameter called vars.

This commit introduces support for this, and essentially copies what is
already present in the other bolt tasks in this module.
@jordanbreen28 jordanbreen28 force-pushed the cat-372-add_var_support_to_vagrant branch 9 times, most recently from 002e445 to dc1bdd9 Compare May 15, 2024 16:20
@jordanbreen28 jordanbreen28 force-pushed the cat-372-add_var_support_to_vagrant branch from dc1bdd9 to 3fc3502 Compare May 16, 2024 11:45
@jordanbreen28 jordanbreen28 marked this pull request as ready for review May 16, 2024 11:46
@jordanbreen28 jordanbreen28 requested a review from a team as a code owner May 16, 2024 11:46
Copy link
Contributor

@LukasAud LukasAud left a comment

Choose a reason for hiding this comment

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

LGTM

@LukasAud LukasAud merged commit 8ab6294 into main May 16, 2024
5 checks passed
@LukasAud LukasAud deleted the cat-372-add_var_support_to_vagrant branch May 16, 2024 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants