Add default role skeleton
This commit is contained in:
parent
db23329aa7
commit
026e8fd9f4
8 changed files with 115 additions and 0 deletions
33
.ansible/skeleton/default/README.md.j2
Normal file
33
.ansible/skeleton/default/README.md.j2
Normal file
|
@ -0,0 +1,33 @@
|
|||
{{ role_name }}
|
||||
=========
|
||||
|
||||
This will setup {{ role_name }}.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
~ADJUST~ You will need to have docker, docker-compose and traefik installed or declared as dependencies with their respective roles.
|
||||
|
||||
~ADJUST~ **This role assumes that you have setup traefik with an endpoint called `websecure`.**
|
||||
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
**Please look at the [defaults/main.yml](defaults/main.yml) for all available variables and their description.**
|
||||
|
||||
**Note: Lines that are commented out via `#` are usually still valid/used variables, but they are not defined by default, so they might enable a feature, when uncommenting/defining them!**
|
||||
|
||||
### Global variables, that are used:
|
||||
|
||||
- ~ADJUST~ `proxy_network`: Defined by the local traefik installation, this is the shared proxy network used by traefik to reach the containers. (optional)
|
||||
- ~ADJUST~ `proxy_hiddenservice`: Defined by the local traefik installation, this is used to generate the alt-svc header for the alternative Tor domain. (optional)
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
- None
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
GPL-3.0-only
|
18
.ansible/skeleton/default/defaults/main.yml.j2
Normal file
18
.ansible/skeleton/default/defaults/main.yml.j2
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
# Default variables for the {{ role_name }} role
|
||||
|
||||
# Infrastructure
|
||||
# Ansible instructions to deploy the infrastructure
|
||||
# Copyright (C) 2021 Saibotk
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, version 3 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
18
.ansible/skeleton/default/handlers/main.yml.j2
Normal file
18
.ansible/skeleton/default/handlers/main.yml.j2
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
# Handlers file for the {{ role_name }} role
|
||||
|
||||
# Infrastructure
|
||||
# Ansible instructions to deploy the infrastructure
|
||||
# Copyright (C) 2021 Saibotk
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, version 3 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
14
.ansible/skeleton/default/meta/main.yml.j2
Normal file
14
.ansible/skeleton/default/meta/main.yml.j2
Normal file
|
@ -0,0 +1,14 @@
|
|||
galaxy_info:
|
||||
author: saibotk
|
||||
description: Setup {{ role_name }}.
|
||||
license: GPL-3.0-only
|
||||
min_ansible_version: 2.9
|
||||
|
||||
platforms:
|
||||
- name: CentOS
|
||||
versions:
|
||||
- 7
|
||||
|
||||
galaxy_tags: []
|
||||
|
||||
dependencies: []
|
18
.ansible/skeleton/default/tasks/main.yml.j2
Normal file
18
.ansible/skeleton/default/tasks/main.yml.j2
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
# Tasks file for the {{ role_name }} role
|
||||
|
||||
# Infrastructure
|
||||
# Ansible instructions to deploy the infrastructure
|
||||
# Copyright (C) 2021 Saibotk
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, version 3 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
0
.ansible/skeleton/default/templates/.gitkeep
Normal file
0
.ansible/skeleton/default/templates/.gitkeep
Normal file
10
README.md
10
README.md
|
@ -18,6 +18,16 @@ Run with your local (test) inventory:
|
|||
ansible-playbook -i test.inventory PLAYBOOK.yml
|
||||
```
|
||||
|
||||
## Create new roles
|
||||
|
||||
When creating new roles, you can set up an initial folder structure with ansible-galaxy and the default skeleton folder structures defined in [.ansible/skeleton](.ansible/skeleton).
|
||||
For more information check out the Ansible documentation [here](https://docs.ansible.com/ansible/devel/galaxy/dev_guide.html#using-a-custom-role-skeleton)
|
||||
|
||||
```
|
||||
cd roles
|
||||
ansible-galaxy init ROLE_NAME
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
This repository is licensed under GPL-3 and many roles are derived from the awesome [infrastructure](https://git.shivering-isles.com/shivering-isles/infrastructure) repository published by [Sheogorath](https://shivering-isles.com).
|
||||
|
|
|
@ -9,3 +9,7 @@ scp_if_ssh = true
|
|||
|
||||
[privilege_escalation]
|
||||
become_ask_pass = false
|
||||
|
||||
[galaxy]
|
||||
role_skeleton = ./.ansible/skeleton/default
|
||||
role_skeleton_ignore = ^.git$,^.*/.git_keep$
|
||||
|
|
Loading…
Add table
Reference in a new issue