c2platform.dev.vagrant_hosts (1.0.1) — module

Creates hosts file content for Vagrant guests and the host.

| "added in version" 1.0.0 of c2platform.dev"

Authors: onknows

Install collection

Install with ansible-galaxy collection install c2platform.dev:==1.0.1


Add to requirements.yml

  collections:
    - name: c2platform.dev
      version: 1.0.1

Description

This module accepts as a parameter the location of a Vagrantfile.yml. See [Vagrant | C2 Platform](https://c2platform.org/docs/concepts/dev/vagrant/).

Based on that it creates content for hosts file of Vagrant guests and the Vagrant host.

It returns this content as an Ansible fact `vagrant_hosts_content`.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Generate hosts file content from Vagrantfile.yml
  c2platform.dev.vagrant_hosts:
    vagrantfile_yml: "{{ inventory_dir }}/Vagrantfile.yml"

Inputs

    
vagrantfile_yml:
    description:
    - The path to a Vagrantfile.yml
    required: true
    type: str

Outputs

vagrant_hosts_content:
  description: Content for /etc/hosts
  returned: when successful
  sample: '1.1.5.205 gsd-rproxy1 gsd-rproxy1.internal.c2platform.org webproxy.c2platform.org
    helloworld.c2platform.org

    1.1.5.208 gsd-checkmk-server gsd-checkmk-server.internal.c2platform.org

    '
  type: str