Replaced self_service.sh with service.py
This commit is contained in:
		| @@ -14,9 +14,10 @@ | ||||
|     <p>Kernel: {{ ansible_facts.kernel }}</p> | ||||
|     <p>Memory usage: {{ ansible_facts.memfree_mb }}/{{ ansible_facts.memtotal_mb }}MB</p> | ||||
|     <p>Python version: {{ ansible_facts.python_version }}</p> | ||||
|     {% if groups['postgresql'] is defined and groups['postgresql']|length > 0 %} | ||||
|     <p> | ||||
|       <?php | ||||
|         $db_handle = pg_connect("host=192.168.56.16 dbname=test user=postgres password=coolshit"); | ||||
|         $db_handle = pg_connect("host={{ groups['postgresql'][0] }} dbname=test user=postgres password={{ hostvars[groups['postgresql'][0]]['psql_pass'] }}"); | ||||
|         if ($db_handle) { | ||||
|           echo "Connection attempt succeeded.\n"; | ||||
|         } else { | ||||
| @@ -27,5 +28,6 @@ | ||||
|         var_dump(pg_fetch_all($result)); | ||||
|       ?> | ||||
|     </p> | ||||
|     {% endif %} | ||||
|   </body> | ||||
| </html> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user