---
    # /home/administrator/code/environments/production/hiera.yaml
    # 하이라 설정 파일
    version: 5
    defaults:
      # The default value for "datadir" is "data" under the same directory as the hiera.yaml
      # file (this file)
      # When specifying a datadir, make sure the directory exists.
      # See https://puppet.com/docs/puppet/latest/environments_about.html for further details on environments.
      # datadir: data
      # data_hash: yaml_data
    hierarchy:
      - name: "Per-node data (yaml version)"
        path: "nodes/%{::trusted.certname}.yaml"
      - name: "Other YAML hierarchy levels"
        paths:
          - "common.yaml"

    하이라 자료는 키와 값 형태로 구성됩니다. 다른 노드에 적용할 때 달라질 값을 변수로 받아서 코드에 적용해야 합니다. webapp::web 클래스에서는 가상 호스트 이름으로 사용할 호스트 이름과 포트 번호가 대상입니다. 매니페스트 web.pp를 수정합니다.

    administrator@vmgate:~/code/environments/production$ vi modules/webapp/manifests/web.pp
    신간 소식 구독하기
    뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.