Project

General

Profile

User story #9078

Create a file template technique

Added by Benoît PECCATTE about 1 year ago. Updated 3 months ago.

Status:
Released
Priority:
N/A
Category:
Techniques
Target version:
Target version (plugin):
Suggestion strength:
User visibility:
Effort required:

Description

The technique would:
- take a template from shared-files
- put it in a stabdard place on the agent
- expand it with a given templating system
- change the file's permission
- have a post-modification hook


Subtasks

User story #11142: filetemplate technique posthookReleasedBenoît PECCATTE

Associated revisions

Revision fee26c9f
Added by Félix DALLIDET 4 months ago

Fixes #9078: Create a file template technique

History

#1 Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 3.1.14 to 3.1.15

#2 Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 3.1.15 to 3.1.16

#3 Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 3.1.16 to 3.1.17

#4 Updated by Vincent MEMBRÉ 12 months ago

  • Target version changed from 3.1.17 to 3.1.18

#5 Updated by Vincent MEMBRÉ 9 months ago

  • Target version changed from 3.1.18 to 3.1.19

#6 Updated by Vincent MEMBRÉ 7 months ago

  • Target version changed from 3.1.19 to 3.1.20

#7 Updated by Vincent MEMBRÉ 6 months ago

  • Target version changed from 3.1.20 to 3.1.21

#8 Updated by Vincent MEMBRÉ 5 months ago

  • Target version changed from 3.1.21 to 3.1.22

#9 Updated by Félix DALLIDET 5 months ago

  • Assignee set to Félix DALLIDET

Benoît PECCATTE wrote:

The technique would:
- take a template from shared-files

I am working on a technique taking a raw input template or a local template file to expand it on a given location

- put it in a standard place on the agent

Template files can be anywhere but the path asked for is relative to /var/rudder/configuration-repository/repository/shared-files/

- expand it with a given templating system

supporting Mustache and Jinja2

- change the file's permission

Change the permissions of the destination conf file generated

- have a post-modification hook

post-hook started when the generated file is different from what the expansion expected or when its permissions are changed

TODO:
Raise an error when the raw input exceed 16K char, make an option for the posthook to be persistant

#10 Updated by Félix DALLIDET 5 months ago

  • Pull Request set to https://github.com/Normation/rudder-techniques/pull/1169

#11 Updated by Félix DALLIDET 4 months ago

  • Status changed from New to Pending technical review
  • Assignee changed from Félix DALLIDET to Benoît PECCATTE
  • Pull Request changed from https://github.com/Normation/rudder-techniques/pull/1169 to https://github.com/Normation/rudder-techniques/pull/1174

#12 Updated by Félix DALLIDET 4 months ago

  • Target version changed from 3.1.22 to 4.1.6

#13 Updated by Félix DALLIDET 4 months ago

  • Pull Request changed from https://github.com/Normation/rudder-techniques/pull/1174 to https://github.com/Normation/rudder-techniques/pull/1175

#14 Updated by Félix DALLIDET 4 months ago

  • Status changed from Pending technical review to Pending release

#15 Updated by Vincent MEMBRÉ 3 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.1.6 and 4.2.0~beta3 which were released today.

Also available in: Atom PDF