initial commit

This commit is contained in:
muppeth 2021-06-20 17:47:55 +02:00
parent 8149b6f67e
commit 7b8ed0a497
Signed by: muppeth
GPG Key ID: 0EBC7B9848D04031
5 changed files with 39 additions and 1 deletions

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) <year> <copyright holders>
Copyright (c) 2021 "Stichting Disroot.org"
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

View File

@ -1,2 +1,3 @@
# container-scripts
Simple role that deploys bunch of scripts from all kind of repos.

8
defaults/main.yml Normal file
View File

@ -0,0 +1,8 @@
---
ct_scripts:
- name: 'operations'
repo: ''
options:
- 'OPTION1="item1"'
- 'OPTION2="item2"'
- 'OPTION3="item3"'

24
tasks/main.yml Normal file
View File

@ -0,0 +1,24 @@
---
- name: '[Container Scripts] - Deploy scripts'
git:
repo: "{{ item.repo }}"
dest: "/usr/local/bin/container-scripts/{{ item.name }}"
force: yes
update: yes
version: "{{ item.version }}"
with_items: "{{ ct_scripts }}"
- name: '[Container Scripts] - Make sure var dir exists'
file:
path: "/var/local/container-scripts"
state: "directory"
recurse: yes
- name: '[Container Scripts] - Deploy config files'
template:
src: var.cfg.j2
dest: "/var/local/container-scripts/{{ item.name }}.cfg"
with_items: "{{ ct_scripts }}"

5
templates/var.cfg.j2 Normal file
View File

@ -0,0 +1,5 @@
# This is the configuration file of {{ item.name }} script set. For more details on options, please refer to git page of the script
{% for option in item.options %}
{{ option }}
{% endfor %}