diff --git a/lazy.ansible/.manala/docker/Dockerfile.tmpl b/lazy.ansible/.manala/docker/Dockerfile.tmpl index 6ffe21d0..da8af937 100644 --- a/lazy.ansible/.manala/docker/Dockerfile.tmpl +++ b/lazy.ansible/.manala/docker/Dockerfile.tmpl @@ -11,6 +11,7 @@ ARG MANALA_GROUP_ID="1000" ARG GOSU_VERSION="1.16" ARG GOMPLATE_VERSION="3.11.5" +ARG DIRENV_VERSION="2.33.0" # The 'container' environment variable tells systemd that it's running inside a # Docker container environment. @@ -49,6 +50,10 @@ RUN \ && curl -sSL "https://github.com/hairyhenderson/gomplate/releases/download/v${GOMPLATE_VERSION}/gomplate_linux-{{ include "arch_map" (dict "amd64" "amd64" "arm64" "arm64") }}" \ --output /usr/local/bin/gomplate \ && chmod +x /usr/local/bin/gomplate \ + # Direnv + && curl -sSL "https://github.com/direnv/direnv/releases/download/v${DIRENV_VERSION}/direnv.linux-{{ include "arch_map" (dict "amd64" "amd64" "arm64" "arm64") }}" \ + --output /usr/local/bin/direnv \ + && chmod +x /usr/local/bin/direnv \ # Bash completion && install --verbose --mode 0755 --directory /etc/bash_completion.d \ # Oh My Bash diff --git a/lazy.ansible/.manala/etc/direnv/config.toml b/lazy.ansible/.manala/etc/direnv/config.toml new file mode 100644 index 00000000..396226a5 --- /dev/null +++ b/lazy.ansible/.manala/etc/direnv/config.toml @@ -0,0 +1,5 @@ +[whitelist] + +# Mark directories as “trusted” +# See: https://direnv.net/man/direnv.toml.1.html#codeprefixcode +prefix = [ "{{ .Env.MANALA_DIR }}" ] diff --git a/lazy.ansible/.manala/etc/profile.d/zz-direnv.sh.tmpl b/lazy.ansible/.manala/etc/profile.d/zz-direnv.sh.tmpl new file mode 100644 index 00000000..24ea5737 --- /dev/null +++ b/lazy.ansible/.manala/etc/profile.d/zz-direnv.sh.tmpl @@ -0,0 +1,8 @@ +eval "$(direnv hook bash)" + +# Config directory +export DIRENV_CONFIG=/etc/direnv + +# Faint output +# See: https://github.com/direnv/direnv/wiki/Quiet-or-Silence-direnv +export DIRENV_LOG_FORMAT=$'\033[2mdirenv: %s\033[0m' diff --git a/lazy.ansible/test/goss.yaml b/lazy.ansible/test/goss.yaml index 6eecf7f9..569c4ea1 100644 --- a/lazy.ansible/test/goss.yaml +++ b/lazy.ansible/test/goss.yaml @@ -55,6 +55,11 @@ command: exit-status: 0 stdout: - gomplate version 3.11.5 + # Direnv + direnv --version: + exit-status: 0 + stdout: + - 2.33.0 # Goss goss --version: exit-status: 0 diff --git a/lazy.kubernetes/.manala/docker/Dockerfile.tmpl b/lazy.kubernetes/.manala/docker/Dockerfile.tmpl index 1e68f20d..8e702dc0 100644 --- a/lazy.kubernetes/.manala/docker/Dockerfile.tmpl +++ b/lazy.kubernetes/.manala/docker/Dockerfile.tmpl @@ -11,6 +11,7 @@ ARG MANALA_GROUP_ID="1000" ARG GOSU_VERSION="1.16" ARG GOMPLATE_VERSION="3.11.5" +ARG DIRENV_VERSION="2.33.0" # The 'container' environment variable tells systemd that it's running inside a # Docker container environment. @@ -49,6 +50,10 @@ RUN \ && curl -sSL "https://github.com/hairyhenderson/gomplate/releases/download/v${GOMPLATE_VERSION}/gomplate_linux-{{ include "arch_map" (dict "amd64" "amd64" "arm64" "arm64") }}" \ --output /usr/local/bin/gomplate \ && chmod +x /usr/local/bin/gomplate \ + # Direnv + && curl -sSL "https://github.com/direnv/direnv/releases/download/v${DIRENV_VERSION}/direnv.linux-{{ include "arch_map" (dict "amd64" "amd64" "arm64" "arm64") }}" \ + --output /usr/local/bin/direnv \ + && chmod +x /usr/local/bin/direnv \ # Bash completion && install --verbose --mode 0755 --directory /etc/bash_completion.d \ # Oh My Bash diff --git a/lazy.kubernetes/.manala/etc/direnv/config.toml b/lazy.kubernetes/.manala/etc/direnv/config.toml new file mode 100644 index 00000000..396226a5 --- /dev/null +++ b/lazy.kubernetes/.manala/etc/direnv/config.toml @@ -0,0 +1,5 @@ +[whitelist] + +# Mark directories as “trusted” +# See: https://direnv.net/man/direnv.toml.1.html#codeprefixcode +prefix = [ "{{ .Env.MANALA_DIR }}" ] diff --git a/lazy.kubernetes/.manala/etc/profile.d/zz-direnv.sh.tmpl b/lazy.kubernetes/.manala/etc/profile.d/zz-direnv.sh.tmpl new file mode 100644 index 00000000..24ea5737 --- /dev/null +++ b/lazy.kubernetes/.manala/etc/profile.d/zz-direnv.sh.tmpl @@ -0,0 +1,8 @@ +eval "$(direnv hook bash)" + +# Config directory +export DIRENV_CONFIG=/etc/direnv + +# Faint output +# See: https://github.com/direnv/direnv/wiki/Quiet-or-Silence-direnv +export DIRENV_LOG_FORMAT=$'\033[2mdirenv: %s\033[0m' diff --git a/lazy.kubernetes/test/goss.yaml b/lazy.kubernetes/test/goss.yaml index d3e38cd2..56ac25a6 100644 --- a/lazy.kubernetes/test/goss.yaml +++ b/lazy.kubernetes/test/goss.yaml @@ -41,6 +41,11 @@ command: exit-status: 0 stdout: - gomplate version 3.11.5 + # Direnv + direnv --version: + exit-status: 0 + stdout: + - 2.33.0 # Goss goss --version: exit-status: 0 diff --git a/lazy.symfony/.manala/docker/Dockerfile.tmpl b/lazy.symfony/.manala/docker/Dockerfile.tmpl index 523c1a09..e90125bf 100644 --- a/lazy.symfony/.manala/docker/Dockerfile.tmpl +++ b/lazy.symfony/.manala/docker/Dockerfile.tmpl @@ -11,6 +11,7 @@ ARG MANALA_GROUP_ID="1000" ARG GOSU_VERSION="1.16" ARG GOMPLATE_VERSION="3.11.5" +ARG DIRENV_VERSION="2.33.0" # The 'container' environment variable tells systemd that it's running inside a # Docker container environment. @@ -49,6 +50,10 @@ RUN \ && curl -sSL "https://github.com/hairyhenderson/gomplate/releases/download/v${GOMPLATE_VERSION}/gomplate_linux-{{ include "arch_map" (dict "amd64" "amd64" "arm64" "arm64") }}" \ --output /usr/local/bin/gomplate \ && chmod +x /usr/local/bin/gomplate \ + # Direnv + && curl -sSL "https://github.com/direnv/direnv/releases/download/v${DIRENV_VERSION}/direnv.linux-{{ include "arch_map" (dict "amd64" "amd64" "arm64" "arm64") }}" \ + --output /usr/local/bin/direnv \ + && chmod +x /usr/local/bin/direnv \ # Bash completion && install --verbose --mode 0755 --directory /etc/bash_completion.d \ # Oh My Bash diff --git a/lazy.symfony/.manala/etc/direnv/config.toml b/lazy.symfony/.manala/etc/direnv/config.toml new file mode 100644 index 00000000..396226a5 --- /dev/null +++ b/lazy.symfony/.manala/etc/direnv/config.toml @@ -0,0 +1,5 @@ +[whitelist] + +# Mark directories as “trusted” +# See: https://direnv.net/man/direnv.toml.1.html#codeprefixcode +prefix = [ "{{ .Env.MANALA_DIR }}" ] diff --git a/lazy.symfony/.manala/etc/profile.d/zz-direnv.sh.tmpl b/lazy.symfony/.manala/etc/profile.d/zz-direnv.sh.tmpl new file mode 100644 index 00000000..24ea5737 --- /dev/null +++ b/lazy.symfony/.manala/etc/profile.d/zz-direnv.sh.tmpl @@ -0,0 +1,8 @@ +eval "$(direnv hook bash)" + +# Config directory +export DIRENV_CONFIG=/etc/direnv + +# Faint output +# See: https://github.com/direnv/direnv/wiki/Quiet-or-Silence-direnv +export DIRENV_LOG_FORMAT=$'\033[2mdirenv: %s\033[0m' diff --git a/lazy.symfony/test/goss.yaml b/lazy.symfony/test/goss.yaml index aadbeebc..b1138b97 100644 --- a/lazy.symfony/test/goss.yaml +++ b/lazy.symfony/test/goss.yaml @@ -49,6 +49,11 @@ command: exit-status: 0 stdout: - gomplate version 3.11.5 + # Direnv + direnv --version: + exit-status: 0 + stdout: + - 2.33.0 # Goss goss --version: exit-status: 0