Skip to content

Embed ansible playbooks in instance templates #3442

Closed
@jandubois

Description

@jandubois
          Should be rewritten with the new feature to assemble templates.

i.e. provision.playbook should be converted to use locator as well

provision:
- mode: ansible
  file:
    url: ./templates/ansible/playbook.yaml

Currently it is being read into script, but should also be for playbook.

NOTE: The playbook is recursive, so needs to be parsed to be embedded...

templates/ansible
├── playbook.yaml
├── README.md
└── roles
    └── hostname
        ├── tasks
        │   └── main.yaml
        └── templates
            └── test.j2

4 directories, 4 files

Unfortunately Ansible does not provide a good way to use a single yaml file.

I have no idea if embedding works for scripts that include functions from files...

Originally posted by @afbjorklund in #2676 (comment)

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