24 lines
856 B
Django/Jinja
24 lines
856 B
Django/Jinja
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
<title>{{ ansible_facts['hostname'] }}!!!</title>
|
|
<link rel="stylesheet" href="./style.css">
|
|
<link rel="icon" href="./favicon.ico" type="image/x-icon">
|
|
</head>
|
|
<body>
|
|
<main>
|
|
<h1>Welcome to {{ ansible_facts['hostname'] }}</h1> <!-- We can use other variables from facts that ansible gathered, you can check what it have with command - ansible 192.168.0.5 -m ansible.builtin.gather_facts -i inventory.ini --tree ./tmp/facts -->
|
|
</main>
|
|
|
|
<!-- We make jinja2 loop to iterate over environment variables -->
|
|
{% for key, value in ansible_env.items() %}
|
|
<p>variable {{ key }} is {{ value }}</p>
|
|
|
|
{% endfor %}
|
|
|
|
</body>
|
|
</html>
|