converge icon indicating copy to clipboard operation
converge copied to clipboard

Support metadata in configuration files

Open stevendborrelli opened this issue 9 years ago • 5 comments

Support metadata in configuration files.

meta { 
   author = "Sally Hackenstein" 
   organization = "ponies worldwide"
   pgp_key_id = "203A5FE1"
   org_url = ""
   version = "1.0.2"
   vcs_url = "git@git"
   license = "APL 2.0"
   vcs_commit = "sha-of-commit"
   description = "installs docker and fpm"
   platforms: { 
      [ 
          { ubuntu: { versions:  ["trusty", "xenial"] },
          { centos: { .Like: [ "rhel", "fedora" ]  }, 
          { "Mac OS X": all }   
      ]
   }
}

Some ideas:

  • Fields should be optional
  • Platforms can be a little tricky, so we probably want to have some kind of matching and just warn if the platform doesn't match. The main match is the ID.
  • For platform matching we can probably use the constraint engine + built in functions { "centos": [ "> 7" ] } all -> match all versions .Like -> match the LIKE field in /etc/os-release
  • For platform on linux distributions we can use the "like" function to match similar.

stevendborrelli avatar Sep 19 '16 14:09 stevendborrelli

Would it make sense for these things to be parts of module?

On Sep 19, 2016, at 9:00 AM, Steven Borrelli [email protected] wrote:

Support metadata in configuration files:

meta { author = "Sally Hackenstein" organization = "ponies worldwide" version = "1.0.2" vcs_url = "git@git" vcs_commit = "sha-of-commit" description = "installs docker and npm" } — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/asteris-llc/converge/issues/263, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMbq-Vsy96E9eHC20ClqJLbeG-9bxbTks5qrpWFgaJpZM4KAhUv.

rebeccaskinner avatar Sep 19 '16 14:09 rebeccaskinner

seems like this would be more like module metadata within a module, instead of the call to the module itself

BrianHicks avatar Sep 19 '16 18:09 BrianHicks

Seems like this should ship with a converge info x.hcl command to view this information

BrianHicks avatar Sep 21 '16 15:09 BrianHicks

We could probably dump the platforms key for the first version.

stevendborrelli avatar Sep 21 '16 15:09 stevendborrelli

Let's say that the initial UI for this is converge info x.hcl so we can move forward with it.

BrianHicks avatar Sep 26 '16 18:09 BrianHicks