Documentation
Rash version v1.3
Rash version v2.9
Rash version v2.8
Rash version v2.7
Rash version v2.6
Rash version v2.5
Rash version v2.4
Rash version v2.3
Rash version v2.2
Rash version v2.1
Rash version v2.0
Rash version v1.10
Rash version v1.9
Rash version v1.8
Rash version v1.7
Rash version v1.6
Rash version v1.5
Rash version v1.4
Rash version v1.3
Rash version v1.2
Rash version v1.1
Rash version v1.0
Rash version master
PLEASE NOTE: This document applies to v1.3 version and not to the latest stable release v2.9
Documentation for other releases can be found by using the version selector in the left bottom of any doc page.Getting started
Simple YAML declarative shell scripting language based on modules and templates.
rash
syntax is inspired by Ansible.
Quickstart
To start using rash
you just need a container with entrypoint.
For install, add rash
binary to your Dockerfile:
FROM rustagainshell/rash AS rash
FROM nginx
COPY --from=rash /bin/rash /bin
COPY entrypoint.rh /
ENTRYPOINT ["/entrypoint.rh"]
Also, you must create your first entrypoint.rh
:
#!/bin/rash
- copy:
content: |
server {
listen 80;
{% for domain in env.DOMAINS | split(pat=',') -%}
{% set path = domain | split(pat='.') | first -%}
location /{{ path }} {
rewrite /{{ path }}[/]?(.*) /$1 break;
proxy_pass http://{{ domain }};
}
{% endfor %}
}
dest: /etc/nginx/conf.d/default.conf
- command:
argv: [nginx, '-g', 'daemon off;']
transfer_pid_1: true
Syntax
YAML syntax based on modules.
Besides, rash
includes Tera templates which you can use
anywhere. You can use all its functions and combine them as you want.
rash
implements custom builtins, too. For example, {{ rash.path }}
or
{{ env.MY_ENV_VAR }}
.