1
꼭두각시의 버전 3.8을 사용 중이며 IP 주소를 문자열로 변환해야합니다. String 함수를 시도했지만 오류가 발생했습니다.인형으로 ip를 문자열로 변환하는 방법
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Syntax error at '('; expected ')' at /etc/puppet/modules/resolver/manifests/params.pp:2 on node example.intranet.example.br
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
'$ :: ipaddress' 사실은 이미 * Puppet 3/Facter 2의 문자열입니다. 새로운 Puppet 유형 시스템은 롤이었습니다 Puppet 4를 사용하여 편집했습니다. 그 전에 모든 사실은 문자열, 문자열 목록 또는 문자열 키와 문자열 값이있는 해시였습니다. –
@JohnBollinger는 답을 주었지만, 3.8에서 미래 파서가 필요하다고 생각하는 형식 변환도 제공합니다. –
또한'$ octs = split ($ :: ipaddress, '.')'와'$ octs [0]'은 커스텀 사실로 더 잘 처리 될 것입니다. –