0
심지어 가능 할지도 모른다.꼭두각시에서 해시 값으로 키를 얻는 방법
$some_external_value = 'pew_pew'
$dict = {
ensure => $ensure,
configuration => {
"random_name-${some_external_value}" => {
command => 'python script.py config/random_name-${some_external_value}.cfg',
},
"some_other_name-${some_external_value}" => {
command => 'python script.py config/some_other_name-${some_external_value}.cfg',
},
"without-external" => {
command => "python script.py config/without-external.cfg",
user => 'cluster',
},
}
}
notice ($dict["configuration"]["some_other_name-${some_external_value}"]["command"])
내가
notice: Scope(Class[main]): python script.py config/some_other_name-pew_pew.cfg
한 번만하고 그냥 참조 후 키 이름을 쓸 수있는 몇 가지 트릭이 거기를 얻을 : 는이 같은 매니페스트가 있나요?
"some_other_name-${some_external_value}" => {
command => 'python script.py config/${wild_magic_variable_pasting_key_here}.cfg',
},