generate readme automatically
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
|
||||
sean_login_info.yml
|
||||
.DS_Store
|
||||
|
||||
@@ -28,7 +28,7 @@ ansible-playbook playbooks/install_demo.yml -e @choose_demo.yml
|
||||
<tr>
|
||||
<td>Deploy Application</td>
|
||||
<td><pre>demo: deploy_application</pre></td>
|
||||
<td>simple survey to install yum applications on Linux</td>
|
||||
<td>install yum applications on Linux with a survey</td>
|
||||
<td><a href="https://www.youtube.com/watch?v=pU8ZgSBuEJw&list=PLdu06OJoEf2bp-PNtxPP_2n7Avkax8TED&index=1">Youtube Video</a></td>
|
||||
<td>
|
||||
<ul>
|
||||
|
||||
11
playbooks/generate_readme.yml
Normal file
11
playbooks/generate_readme.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
- name: setup deploy application demo
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
connection: local
|
||||
|
||||
tasks:
|
||||
|
||||
- name: install demo
|
||||
include_role:
|
||||
name: "../roles/generate_readme"
|
||||
@@ -1,6 +1,7 @@
|
||||
demos:
|
||||
deploy_application:
|
||||
name: "Deploy Application (survey)"
|
||||
description: "install yum applications on Linux with a survey"
|
||||
job_type: "run"
|
||||
inventory: "Workshop Inventory"
|
||||
project: "Ansible official demo project"
|
||||
@@ -8,6 +9,7 @@ demos:
|
||||
credential: "Workshop Credential"
|
||||
survey_enabled: yes
|
||||
survey_spec: "{{survey_deploy_application}}"
|
||||
video: "https://www.youtube.com/watch?v=pU8ZgSBuEJw&list=PLdu06OJoEf2bp-PNtxPP_2n7Avkax8TED"
|
||||
project:
|
||||
name: "Ansible official demo project"
|
||||
description: "prescriptive demos from Red Hat Management Buisness Unit"
|
||||
@@ -19,6 +21,7 @@ demos:
|
||||
- rhel
|
||||
windows_iis:
|
||||
name: "Windows IIS Server"
|
||||
description: "install webserver on Windows Server with a survey"
|
||||
job_type: "run"
|
||||
inventory: "Workshop Inventory"
|
||||
project: "Ansible official demo project"
|
||||
@@ -35,6 +38,7 @@ demos:
|
||||
- windows
|
||||
openscap:
|
||||
name: "Create Openscap Report"
|
||||
description: "Create HTML report using SCAP Security Guide (SSG)"
|
||||
job_type: "run"
|
||||
inventory: "Workshop Inventory"
|
||||
project: "Ansible official demo project"
|
||||
@@ -52,6 +56,7 @@ demos:
|
||||
- rhel
|
||||
developer_report:
|
||||
name: "Create Developer Report"
|
||||
description: 'Create HTML report using <a href="https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#variables-discovered-from-systems-facts">Ansible facts</a>'
|
||||
job_type: "run"
|
||||
inventory: "Workshop Inventory"
|
||||
project: "Ansible official demo project"
|
||||
|
||||
67
playbooks/test.md
Normal file
67
playbooks/test.md
Normal file
@@ -0,0 +1,67 @@
|
||||
# Official Ansible Product Demos
|
||||
|
||||
this is currently under construction and working on a minimal viable demo for testing purposes
|
||||
|
||||
# How to use
|
||||
|
||||
## 1. Provide login information and choose demo
|
||||
|
||||
- Modify the `choose_demo.yml` file that is included in this repo with the username, password and IP address (or DNS name) of your Ansible Tower
|
||||
- Choose the demo name you want from the table below (or choose `all`)
|
||||
|
||||
## 2. Run Ansible Playbook
|
||||
|
||||
```
|
||||
ansible-playbook playbooks/install_demo.yml -e @choose_demo.yml
|
||||
```
|
||||
|
||||
# Demo Repository
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Demo Name</th>
|
||||
<th>install_demo.yml value</th>
|
||||
<th>Description</th>
|
||||
<th>Video Walkthrough</th>
|
||||
<th>Workshop Types</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Windows IIS Server</td>
|
||||
<td><pre>demo: windows_iis</pre></td>
|
||||
<td>install webserver on Windows Server with a survey</td>
|
||||
<td>Not available </td>
|
||||
<td>- windows
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Create Developer Report</td>
|
||||
<td><pre>demo: developer_report</pre></td>
|
||||
<td>Create HTML report using <a href="https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#variables-discovered-from-systems-facts">Ansible facts</a></td>
|
||||
<td>Not available </td>
|
||||
<td>- f5
|
||||
- rhel
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deploy Application (survey)</td>
|
||||
<td><pre>demo: deploy_application</pre></td>
|
||||
<td>install yum applications on Linux with a survey</td>
|
||||
<td><a href="https://www.youtube.com/watch?v=pU8ZgSBuEJw&list=PLdu06OJoEf2bp-PNtxPP_2n7Avkax8TED">Video Link</a></td>
|
||||
<td>- f5
|
||||
- rhel
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Create Openscap Report</td>
|
||||
<td><pre>demo: openscap</pre></td>
|
||||
<td>Create HTML report using SCAP Security Guide (SSG)</td>
|
||||
<td>Not available </td>
|
||||
<td>- f5
|
||||
- rhel
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
# Contribute
|
||||
|
||||
please refer to the [contribute.md](docs/contribute.md) documentation included in this collection.
|
||||
5
roles/generate_readme/tasks/main.yml
Normal file
5
roles/generate_readme/tasks/main.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- name: create readme
|
||||
template:
|
||||
src: readme.j2
|
||||
dest: "{{playbook_dir}}/test.md"
|
||||
41
roles/generate_readme/templates/readme.j2
Normal file
41
roles/generate_readme/templates/readme.j2
Normal file
@@ -0,0 +1,41 @@
|
||||
# Official Ansible Product Demos
|
||||
|
||||
this is currently under construction and working on a minimal viable demo for testing purposes
|
||||
|
||||
# How to use
|
||||
|
||||
## 1. Provide login information and choose demo
|
||||
|
||||
- Modify the `choose_demo.yml` file that is included in this repo with the username, password and IP address (or DNS name) of your Ansible Tower
|
||||
- Choose the demo name you want from the table below (or choose `all`)
|
||||
|
||||
## 2. Run Ansible Playbook
|
||||
|
||||
```
|
||||
ansible-playbook playbooks/install_demo.yml -e @choose_demo.yml
|
||||
```
|
||||
|
||||
# Demo Repository
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Demo Name</th>
|
||||
<th>install_demo.yml value</th>
|
||||
<th>Description</th>
|
||||
<th>Video Walkthrough</th>
|
||||
<th>Workshop Types</th>
|
||||
</tr>
|
||||
{% for key, value in demos.iteritems() %}
|
||||
<tr>
|
||||
<td>{{value.name}}</td>
|
||||
<td><pre>demo: {{key}}</pre></td>
|
||||
<td>{{value.description}}</td>
|
||||
<td>{% if value.video is defined%}<a href="{{ value.video}}">Video Link</a>{% else %}Not available {% endif %}</td>
|
||||
<td>{{value.workshop_type|to_nice_yaml}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
# Contribute
|
||||
|
||||
please refer to the [contribute.md](docs/contribute.md) documentation included in this collection.
|
||||
@@ -13,6 +13,7 @@
|
||||
- name: add job template without survey
|
||||
tower_job_template:
|
||||
name: "{{item.value.name}}"
|
||||
description: "{{item.value.description}}"
|
||||
job_type: "{{item.value.job_type}}"
|
||||
inventory: "{{item.value.inventory}}"
|
||||
project: "{{item.value.project}}"
|
||||
@@ -29,6 +30,7 @@
|
||||
- name: add job template with survey
|
||||
tower_job_template:
|
||||
name: "{{item.value.name}}"
|
||||
description: "{{item.value.description}}"
|
||||
job_type: "{{item.value.job_type}}"
|
||||
inventory: "{{item.value.inventory}}"
|
||||
project: "{{item.value.project}}"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
- name: add tower project
|
||||
tower_project:
|
||||
name: "{{project.my_name}}"
|
||||
description: "{{project.my_description}}"
|
||||
organization: "{{project.my_organization}}"
|
||||
scm_type: "{{project.my_scm_type}}"
|
||||
scm_url: "{{project.my_scm_url}}"
|
||||
name: "{{project.name}}"
|
||||
description: "{{project.description}}"
|
||||
organization: "{{project.organization}}"
|
||||
scm_type: "{{project.scm_type}}"
|
||||
scm_url: "{{project.scm_url}}"
|
||||
tower_username: "{{my_tower_username}}"
|
||||
tower_password: "{{my_tower_password}}"
|
||||
tower_host: "{{my_tower_host}}"
|
||||
@@ -13,6 +13,7 @@
|
||||
- name: add single job template without survey
|
||||
tower_job_template:
|
||||
name: "{{demos[demo].name}}"
|
||||
description: "{{demos[demo].description}}"
|
||||
job_type: "{{demos[demo].job_type}}"
|
||||
inventory: "{{demos[demo].inventory}}"
|
||||
project: "{{demos[demo].project}}"
|
||||
@@ -29,6 +30,7 @@
|
||||
- name: add single job template with survey
|
||||
tower_job_template:
|
||||
name: "{{demos[demo].name}}"
|
||||
description: "{{demos[demo].description}}"
|
||||
job_type: "{{demos[demo].job_type}}"
|
||||
inventory: "{{demos[demo].inventory}}"
|
||||
project: "{{demos[demo].project}}"
|
||||
|
||||
Reference in New Issue
Block a user