Skip to content

Extend CSV inventory to support per-instance configurations #35

Description

@wagoodman

As hinted to in #9 (comment) , it would be great to be able to map arbitrary CSV columns to instance parameters that override the global or inventory ssh configuration. For example, a CSV inventory with extra columns:

name, address, user, ssh-key
server-1, 123.87.123.223, admin, id_rsa.ss1
awesome-server-2, 22.54.21.123, frank, id_dsa.key42

Bridgy could take advantage of the extra information like so:

inventory:
  source:
    - type: csv
      name: on-site servers
      file: somefile.csv
      fields: name, address, user, ssh_key
      ssh:
        user: fields['user']
        options: -i fields['ssh_key']

The yaml format needs more thought, but that's the general idea (I'm open to suggestions).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions