Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/template override and files switch #19

Commits on Feb 6, 2019

  1. Configuration menu
    Copy the full SHA
    2dd659f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    784ce72 View commit details
    Browse the repository at this point in the history

Commits on Feb 7, 2019

  1. Cosmetics modification of TOFS pattern documentation

    * TOFS_pattern.md: add myself as modifier.
      Trim trailing whitespaces.
      Separate titles from first paragraph.
    baby-gnu committed Feb 7, 2019
    Configuration menu
    Copy the full SHA
    8bbab14 View commit details
    Browse the repository at this point in the history
  2. Make TOFS pattern example usable

    The example could not be used as-is. This commit improve conformity to
    formula conventions.
    
    * TOFS_pattern.md: add missing commas “,” in “map.jinja” and extra one
      to ease the addition of new entries.
      Import “map.jinja” in “init.sls” and “conf.sls”.
      Declare descriptive state IDs.
      Use the “module.function” notation.
      Use the “name” parameter.
    baby-gnu committed Feb 7, 2019
    Configuration menu
    Copy the full SHA
    6c17974 View commit details
    Browse the repository at this point in the history
  3. Accept pillar separator in “files_switch” prefix

    The prefix was used for 2 purposes:
    
    - define the pillar prefix where to lookup “:files_switch”. It
      supports the colon “:” separator to lookup in pillar subtree like
      “foo:bar”
    - define the path prefix where to look for “files/”, It did not support
      separator to lookup inside directory tree.
    
    This patch only replace any colon “:” with “/” when looking up
    “files/” directory, with the “foo:bar” prefix:
    
    - lookup “foo:bar:files_switch” pillar to get list of grains to match
    - lookup files under “salt://foo/bar/files/”
    
    * TOFS_pattern.md: document the new use of “prefix” supporting colon “:”.
    
    * template/macros.jinja: transform any colon “:” in “prefix” by slash
      “/” to lookup files.
    baby-gnu committed Feb 7, 2019
    Configuration menu
    Copy the full SHA
    e4e7067 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    24eaeb7 View commit details
    Browse the repository at this point in the history
  5. Remove double slash in generated salt URL

    When the files are “full path” with leading slash “/”, the generated
    URL contain a double slash because of the join.
    
    * template/macros.jinja: remove leading slash before joining parts.
    
    * TOFS_pattern.md: mirror changes of “macros.jinja”.
    baby-gnu committed Feb 7, 2019
    Configuration menu
    Copy the full SHA
    8bd2157 View commit details
    Browse the repository at this point in the history
  6. Examples must be consistent

    The “template” is kept during rendering.
    
    * TOFS_pattern.md: add “template” to rendered state.
    
    * template/macros.jinja: ditoo.
    baby-gnu committed Feb 7, 2019
    Configuration menu
    Copy the full SHA
    312fcdb View commit details
    Browse the repository at this point in the history