Skip to content

Troubleshooting Ansible Inventories Generation

Why do that

During PunchPlatform deployment, an error occurs during inventories generation :

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
Generating new '/home/admin/pp-conf/platforms/production/generated_inventory/current-deployment.inv' ansible inventory
from PunchPlatform property file '/home/admin/pp-conf/punchplatform.properties'
   deployment settings '/home/admin/pp-conf/punchplatform-deployment.settings'
   distribs  '{
"local_punchplatform_distribs_dir" : /home/admin/punchplatform-deployer-3.0.5/archives,
"local_dependencies_distribs_dir": /home/admin/punchplatform-deployer-3.0.5/archives
}'
   jinja template '/home/admin/punchplatform-deployer-3.0.5/inventory_templates/punchplatform-deployment-inventory-template.j2'
Computing dynamic values from properties and settings files...
ERROR: Could not retrieve element matching json path '.elasticsearch.clusters.es_search.nodes.target.myzone.lan.rack_id.  punchplatform-deployer.sh:commons-lib.sh:695
FATAL ERROR could not read PunchPlatform property 'elasticsearch.clusters.es_search.nodes.target.myzone.lan.rack_id'. punchplatform-deployer.sh:punchplatform-lib.sh:137

What to do

  • You've completed a field with a long hostname (target.myzone.lan here) instead of a short name (target here). Please correct your punchplatform.properties configuration file as following:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
    "elasticsearch": {
      "clusters": {
        "es_search": {
          "nodes": {
            "target": { (instead of "target.myzone.lan")
              ...
            },
            ...
          },
          ...
        },
        ...
      },
      ...
    }

Furthermore, in case of single machine deployment all hostnames have to be short (without a point .).

  • Relaunch deployer:

    punchplatform-deployer.sh deploy -k -K (passwords will be asked)