vagrant-installed

Example:

# Install Vagrant, version 2.2.2, force re-install even if already present.
- vagrant-installed:
    version: 2.2.4
    force: true

Description

Installs the Vagrant package.

Resources

Variables

Name Type Default Description

force_update

boolean False

Install/update Vagrant, even if it is already installed.

version

string 2.2.4

The version of Vagrant to install.

Examples

Example 1

Install Vagrant, version 2.2.2, force re-install even if already present.

Code
- vagrant-installed:
    version: 2.2.4
    force: true

Code

doc:
  short_help: Ensures Vagrant is installed.
  help: |
    Installs the [Vagrant](https://vagrantup.com) package.
  references:
    Vagrant homepage: https://vagrantup.com
    freckfrackery.install-vagrant Ansible role: https://gitlab.com/freckfrackery/freckfrackery.install-vagrant
  examples:
  - title: Install Vagrant, version 2.2.2, force re-install even if already present.
    vars:
      version: 2.2.4
      force: true

args:
  force_update:
    required: false
    default: false
    type: boolean
    doc:
      short_help: Install/update Vagrant, even if it is already installed.
    cli:
      is_flag: true
      param_decls:
      - --force-update
      - -f
  version:
    required: false
    type: string
    default: 2.2.4
    doc:
      short_help: The version of Vagrant to install.
    cli:
      metavar: VERSION
#  virtualbox:
#     required: false
#     type: boolean
#     doc:
#       short_help: "Whether to also install Virtualbox."
#     cli:
#       is_flag: true

meta:
  tags:
  - install
  - vagrant
  - container
  - vm
  - virtualization
  - featured-frecklecutable

frecklets:
- frecklet:
    name: freckfrackery.install-vagrant
    type: ansible-role
    resources:
      ansible-role:
      - freckfrackery.install-vagrant
    desc:
      short: install Vagrant
      references:
        "'freckfrackery.install-vagrant' Ansible role": https://gitlab.com/freckfrackery/freckfrackery.install-vagrant
    properties:
      elevated: true
      idempotent: true
      internet: true
  vars:
    vagrant_version: '{{:: version ::}}'
    vagrant_force_update: '{{:: force_update ::}}'
#  - task:
#      name: install-virtualbox
#      __skip__: true
frecklecute vagrant-installed --help

Usage: frecklecute vagrant-installed [OPTIONS]

  Installs the [Vagrant](https://vagrantup.com) package.

Options:
  -f, --force-update  Install/update Vagrant, even if it is already installed.
  --version VERSION   The version of Vagrant to install.
  --help              Show this message and exit.
# -*- coding: utf-8 -*-


#
# module path: pycklets.vagrant_installed.VagrantInstalled
#


from dataclasses import dataclass
from pyckles import AutoPycklet
from typing import *    # noqa

@dataclass
class VagrantInstalled(AutoPycklet):
    """Installs the [Vagrant](https://vagrantup.com) package.

       Args:
         force_update: Install/update Vagrant, even if it is already installed.
         version: The version of Vagrant to install.

    """

    FRECKLET_ID = "vagrant-installed"

    force_update: bool = None
    version: str = None


    def __post_init__(self):
        super(VagrantInstalled, self).__init__(var_names=["force_update", "version"])


frecklet_class = VagrantInstalled
# -*- coding: utf-8 -*-


#
# module path: pycklets.vagrant_installed.VagrantInstalled
#


from pyckles import AutoPycklet

class VagrantInstalled(AutoPycklet):
    """Installs the [Vagrant](https://vagrantup.com) package.

       Args:
         force_update: Install/update Vagrant, even if it is already installed.
         version: The version of Vagrant to install.

    """

    FRECKLET_ID = "vagrant-installed"

    def __init__(self, force_update=None, version="2.2.4"):

        super(VagrantInstalled, self).__init__(var_names=["force_update", "version"])
        self._force_update = force_update
        self._version = version

    @property
    def force_update(self):
        return self._force_update

    @force_update.setter
    def force_update(self, force_update):
        self._force_update = force_update

    @property
    def version(self):
        return self._version

    @version.setter
    def version(self, version):
        self._version = version



frecklet_class = VagrantInstalled