Skip to content

Commit

Permalink
Merge pull request #704 from manala/all/update-manala
Browse files Browse the repository at this point in the history
[All] Update manala
  • Loading branch information
nervo committed Apr 12, 2024
2 parents 9a46cc1 + c307315 commit 5d5d28e
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 24 deletions.
9 changes: 4 additions & 5 deletions .manala.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,13 @@ system:
[safe]
directory = *
ansible:
version: 2.15.5
version: 2.15.8
dependencies:
# Collection community.docker
- docker==6.1.3
- docker==7.0.0
ansible-lint:
version: 6.14.6
molecule:
version: 5.0.1
version: 6.0.3
dependencies:
- molecule-plugins==23.5.0
- molecule-plugins[docker]==23.5.0
- molecule-plugins[docker]==23.5.3
26 changes: 17 additions & 9 deletions .manala/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@ ARG DEBIAN_FRONTEND="noninteractive"
ARG MANALA_USER_ID="1000"
ARG MANALA_GROUP_ID="1000"

ARG GOSU_VERSION="1.16"
ARG GOMPLATE_VERSION="3.11.5"
ARG GOSU_VERSION="1.17"
ARG GOMPLATE_VERSION="3.11.7"
ARG DIRENV_VERSION="2.33.0"

# The 'container' environment variable tells systemd that it's running inside a
# Docker container environment.
# It's also internally used for checking we're running inside a container.
ENV container="docker"

# Default locale
ENV LANG C.UTF-8

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN \
Expand Down Expand Up @@ -49,6 +53,10 @@ RUN \
&& curl -sSL "https://github.com/hairyhenderson/gomplate/releases/download/v${GOMPLATE_VERSION}/gomplate_linux-$(case $(dpkg --print-architecture) in "amd64") echo "amd64" ;; "arm64") echo "arm64" ;; esac)" \
--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-$(case $(dpkg --print-architecture) in "amd64") echo "amd64" ;; "arm64") echo "arm64" ;; esac)" \
--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
Expand All @@ -60,7 +68,7 @@ RUN \
# System #
##########

ENV PIPX_HOME="/usr/local"
ENV PIPX_HOME="/usr/local/pipx"
ENV PIPX_BIN_DIR="/usr/local/bin"

RUN \
Expand All @@ -83,7 +91,8 @@ RUN \
RUN \
curl -sSL https://download.docker.com/linux/debian/gpg \
--output /etc/apt/keyrings/docker.asc \
&& printf "Types: deb\n\
&& printf "\
Types: deb\n\
URIs: https://download.docker.com/linux/debian\n\
Suites: $(. /etc/os-release; echo "${VERSION_CODENAME}")\n\
Components: stable\n\
Expand All @@ -98,9 +107,9 @@ Signed-By: /etc/apt/keyrings/docker.asc\n\
# Ansible
RUN \
pipx install --pip-args="--no-cache-dir" \
ansible-core==2.15.5 \
ansible-core==2.15.8 \
&& pipx inject --pip-args="--no-cache-dir" ansible-core \
docker==6.1.3
docker==7.0.0

# Ansible Lint
RUN \
Expand All @@ -120,11 +129,10 @@ RUN \
# Molecule
RUN \
pipx install --pip-args="--no-cache-dir" \
molecule==5.0.1 \
molecule==6.0.3 \
&& _MOLECULE_COMPLETE=bash_source molecule > /etc/bash_completion.d/molecule \
&& pipx inject --pip-args="--no-cache-dir" molecule \
molecule-plugins==23.5.0 \
molecule-plugins[docker]==23.5.0
molecule-plugins[docker]==23.5.3

# Run
COPY docker/entrypoint.sh /
Expand Down
2 changes: 1 addition & 1 deletion .manala/docker/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
build:
context: ..
dockerfile: docker/Dockerfile
image: manala-ansible-roles:20231019094123
image: manala-ansible-roles:20240315115847
volumes:
- ../..:${MANALA_DIR}
environment:
Expand Down
9 changes: 6 additions & 3 deletions .manala/docker/docker.mk
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,14 @@ MANALA_DOCKER_COMPOSE_BIN_DEFAULT = $(call manala_docker) compose

MANALA_DOCKER_COMPOSE_BIN = $(MANALA_DOCKER_COMPOSE_BIN_DEFAULT)

MANALA_HOST_USER_ID = $(shell id -u)
MANALA_HOST_GROUP_ID = $(shell id -g)

MANALA_DOCKER_COMPOSE_ENV = \
DOCKER_BUILDKIT=1 \
$(if $(MANALA_OS_LINUX), \
MANALA_USER_ID=$(shell id -u) \
MANALA_GROUP_ID=$(shell id -g) \
$(and $(MANALA_OS_LINUX), $(filter-out 0, $(MANALA_HOST_USER_ID)), \
MANALA_USER_ID=$(MANALA_HOST_USER_ID) \
MANALA_GROUP_ID=$(MANALA_HOST_GROUP_ID) \
)

MANALA_DOCKER_COMPOSE_FILE = $(MANALA_DIR)/.manala/docker/compose.yaml
Expand Down
5 changes: 5 additions & 0 deletions .manala/etc/direnv/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[whitelist]

# Mark directories as “trusted”
# See: https://direnv.net/man/direnv.toml.1.html#codeprefixcode
prefix = [ "{{ .Env.MANALA_DIR }}" ]
9 changes: 4 additions & 5 deletions .manala/etc/profile.d/message.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ printf "\033[34m =-=-_-__=_-= _=_=-=_,-'\033[32m|\033[34m\"'\"\"-\033[32m|\033[3
printf "\033[34m =- _=-=- -_=-=_,-\" \033[32m|\033[34m\"\033[0m\n"
printf "\033[34m =- =- -=.--\"\033[0m\n"
printf "\n"
printf " \033[36m‣ ansible \033[35m2.15.5\033[0m\n"
printf " \033[36m· docker==6.1.3\033[0m\n"
printf " \033[36m‣ ansible \033[35m2.15.8\033[0m\n"
printf " \033[36m· docker==7.0.0\033[0m\n"
printf " \033[36m‣ ansible-lint \033[35m6.14.6\033[0m\n"
printf " \033[36m‣ molecule \033[35m5.0.1\033[0m\n"
printf " \033[36m· molecule-plugins==23.5.0\033[0m\n"
printf " \033[36m· molecule-plugins[docker]==23.5.0\033[0m\n"
printf " \033[36m‣ molecule \033[35m6.0.3\033[0m\n"
printf " \033[36m· molecule-plugins[docker]==23.5.3\033[0m\n"
17 changes: 16 additions & 1 deletion .manala/etc/profile.d/oh-my-bash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ export OSH=/usr/local/share/oh-my-bash
# it'll load a random theme each time that oh-my-bash is loaded.
OSH_THEME="font"

# If you set OSH_THEME to "random", you can ignore themes you don't like.
# OMB_THEME_RANDOM_IGNORED=("powerbash10k" "wanelo")

# Uncomment the following line to use case-sensitive completion.
# OMB_CASE_SENSITIVE="true"

Expand Down Expand Up @@ -41,6 +44,14 @@ COMPLETION_WAITING_DOTS="true"
# much, much faster.
DISABLE_UNTRACKED_FILES_DIRTY="true"

# Uncomment the following line if you don't want the repository to be considered dirty
# if there are untracked files.
# SCM_GIT_DISABLE_UNTRACKED_DIRTY="true"

# Uncomment the following line if you want to completely ignore the presence
# of untracked files in the repository.
# SCM_GIT_IGNORE_UNTRACKED="true"

# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output. One of the following values can
# be used to specify the timestamp format.
Expand Down Expand Up @@ -97,7 +108,7 @@ plugins=(

# Which plugins would you like to conditionally load? (plugins can be found in ~/.oh-my-bash/plugins/*)
# Custom plugins may be added to ~/.oh-my-bash/custom/plugins/
# Example format:
# Example format:
# if [ "$DISPLAY" ] || [ "$SSH" ]; then
# plugins+=(tmux-autoattach)
# fi
Expand Down Expand Up @@ -131,3 +142,7 @@ source "$OSH"/oh-my-bash.sh
# Example aliases
# alias bashconfig="mate ~/.bashrc"
# alias ohmybash="mate ~/.oh-my-bash"

# Disable full path print after cd into a directory
# See: https://github.com/ohmybash/oh-my-bash/issues/201
unset CDPATH
8 changes: 8 additions & 0 deletions .manala/etc/profile.d/zz-direnv.sh
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit 5d5d28e

Please sign in to comment.