Skip to content

(ansible) A less complicated hosts mapping #241

@mieel

Description

@mieel

Description of feature

Stackl should be able to pass a list of hostnames to an ansible invocation without using a stackl inventory or policies.
Configuration should be minimal like this:

# postgres-service.yml
  name: postgres-service
  functional_requirements:
    azure_vm: # creates 2 database servers, 3 frontend webservers
      params:
        vm_count: 2
        vm_size: large
    postgres_role:
      params:
        ansible_hosts: "{{ azure_vm.outputs.vm_private_ips }}"
        # postgres_role is going to apply the role on all hosts in the above list

# frontend-service.yml
  name: frontend-service
  functional_requirements:
    azure_vm: # creates 2 database servers, 3 frontend webservers
      params:
        vm_countL: 3
        vm_size: small
    webserver_role:
      params:
        ansible_hosts: "{{ azure_vm.outputs.vm_private_ips }}"
        # webserver_role is going to apply the role on all hosts in the above list

Purpose of this new feature

Defining stackl inventory params is cumbersome and very limited.
Passing a list from the provisioning step is much more intuitive, and less error prone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions