Ansinterface/templates/index.html

61 lines
2.3 KiB
HTML
Raw Permalink Normal View History

2023-12-19 10:32:13 +00:00
{% extends 'base.html' %}
{% block content %}
<div class="card">
<div class="card-header">
Select Playbook and arguments
</div>
<div class="card-body">
<form id="ansibleForm">
2023-12-19 12:48:06 +00:00
<label for="playbook">Playbook <sup style="color:red"></sup></label>
2023-12-19 10:32:13 +00:00
<select id="playbook" class="form-control" name="playbook" placeholder="Profile" required>
{%for file in list %}
<option value={{ file }}>{{ file }}</option>
{%endfor%}
</select>
2023-12-19 12:48:06 +00:00
<!-- -->
<div class="row">
<div class="col">
<label for="hosts">Hosts</label>
2023-12-19 10:32:13 +00:00
<input type="text" name="hosts" class="form-control" placeholder="/path/to/inventory">
2023-12-19 12:48:06 +00:00
<div class="notes">If empty will use default settings.</div>
</div>
<div class="col">
2023-12-19 10:32:13 +00:00
<label for="argument">Arguments</label>
2023-12-19 12:48:06 +00:00
<input type="text" name="argument" class="form-control" placeholder="-e ">
</div>
<div class="col">
2023-12-19 10:32:13 +00:00
<label for="limitation">Limitation</label>
2023-12-19 12:48:06 +00:00
<input type="text" name="limitation" class="form-control" placeholder="-l ">
<div class="notes">Separate your servers with coma (example: localhost,server1...).</div>
</div>
</div>
2023-12-19 10:32:13 +00:00
<br>
<button type="button" class="btn btn-info" onclick="submitForm()">Run</button>
</form>
</div>
</div>
<br>
<div class="card">
<div class="card-header">
Select Playbook to edit:
</div>
<div class="card-body">
<form id="fileedit" action="/edit" method="post">
<label for="playbook">Playbook:</label>
<select id="playbook" class="form-control" name="file_edit" placeholder="Profile" required>
{%for file in list %}
<option value={{ file }}>{{ file }}</option>
{%endfor%}
</select>
<br>
<button type="submit" class="btn btn-info">Edit</button>
</form>
</div>
</div>
{% endblock %}