Project

General

Profile

Actions

User story #25970

open

Make compilation resolved loops over Blocks/Methods in techniques possible

Added by Félix DALLIDET 24 days ago. Updated 4 days ago.

Status:
Pending release
Priority:
N/A
Category:
rudderc
Target version:
UX impact:
Suggestion strength:
User visibility:
Effort required:
Name check:
To do
Fix check:
To do
Regression:
No

Description

Being able to loop/repeat a method|block call in a technique using parameterized local variables would be great.
The loops will be resolved at technique compilation, right before the starting from the leaf element when nested.

The proposed syntax is heavily inspired from the Ansible loops syntax https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_loops.html#using-loops.

  - name: "Install a package" 
    method: package_present
    params:
      name: "${plouf.name}" 
      version: "${plouf.version}" 
    foreach:                 # field to force a loop
      - name: "vim" 
        version: "latest" 
      - name: "htop" 
        version: "2.3.4" 
      - name: "${technique_id.extra_package}" 
        version: "latest" 
    foreach_name: "plouf"    # loop iterator name, useful when loops are nested using blocks
Actions #1

Updated by Félix DALLIDET 24 days ago

  • Status changed from New to In progress
  • Assignee set to Félix DALLIDET
Actions #3

Updated by Félix DALLIDET 24 days ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Félix DALLIDET to Alexis Mousset
  • Pull Request set to https://github.com/Normation/rudder/pull/6049
Actions #4

Updated by Anonymous 4 days ago

  • Status changed from Pending technical review to Pending release
Actions

Also available in: Atom PDF