In the above site-level-config file snippet, we are deploying cream ce on 2 nodes, namely lw-site-droplet-0 and ec2-18-184-37-92.eu-central-1. When the puppet module is running pre-config.py on a particular node, it may need the hostname of the node where it is being deployed. In the pre-config.py for cream, we need to provide hostname of VM where the container is being deployed. As we choose to trust the information in the site-level-configuration-file, we parse the file and find the lightweight-component section that contains config for the current node in the pre-config.py script. Now we encounter 2 nodes and do not know which node's hostname is to be used for the current container's configuration. (CE_HOST in this case). Therefore, we should split the above configuration in the compiler into exactly similar YAML sections for the nodes and assign them different id's.
In the above site-level-config file snippet, we are deploying cream ce on 2 nodes, namely lw-site-droplet-0 and ec2-18-184-37-92.eu-central-1. When the puppet module is running pre-config.py on a particular node, it may need the hostname of the node where it is being deployed. In the pre-config.py for cream, we need to provide hostname of VM where the container is being deployed. As we choose to trust the information in the site-level-configuration-file, we parse the file and find the lightweight-component section that contains config for the current node in the pre-config.py script. Now we encounter 2 nodes and do not know which node's hostname is to be used for the current container's configuration. (CE_HOST in this case). Therefore, we should split the above configuration in the compiler into exactly similar YAML sections for the nodes and assign them different id's.