Skip to content

Commit 0e6cb26

Browse files
authored
Merge pull request #9 from manala/chore/update-stack
chore: update stack
2 parents 3d79bbe + 78467a9 commit 0e6cb26

File tree

32 files changed

+360
-363
lines changed

32 files changed

+360
-363
lines changed

.ansible-lint

Lines changed: 0 additions & 7 deletions
This file was deleted.

.ansible-lint.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
3+
profile: production
4+
5+
offline: true
6+
7+
exclude_paths:
8+
- .github
9+
- .manala
10+
11+
enable_list:
12+
- empty-string-compare
13+
- galaxy-version-incorrect
14+
- loop-var-prefix
15+
- name[prefix]
16+
- no-log-password
17+
- no-prompting
18+
- no-same-owner
19+
- only-builtins

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Ansible Galaxy
2-
ANSIBLE_GALAXY_TOKEN_PATH=galaxy_token
2+
ANSIBLE_GALAXY_TOKEN_PATH = galaxy_token

.github/workflows/lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
steps:
1212

1313
- name: Checkout
14-
uses: actions/checkout@v4
14+
uses: actions/checkout@v5
1515

1616
- name: Set up system
1717
uses: ./.manala/github/system/setup

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
steps:
1414

1515
- name: Checkout
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v5
1717

1818
- name: Set ansible galaxy token
1919
run: |
@@ -37,7 +37,7 @@ jobs:
3737
make build VERBOSE=1
3838
3939
- name: Upload build artifact
40-
uses: actions/upload-artifact@v4
40+
uses: actions/upload-artifact@v5
4141
with:
4242
path: build/manala-path-${{ steps.version.outputs.version }}.tar.gz
4343
name: manala-path-${{ steps.version.outputs.version }}.tar.gz

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
steps:
1212

1313
- name: Checkout
14-
uses: actions/checkout@v4
14+
uses: actions/checkout@v5
1515

1616
- name: Set up system
1717
uses: ./.manala/github/system/setup

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
build/
22
.env.local
33
galaxy_token
4+
5+
# Ignore ansible-lint cache
6+
# See: https://github.com/ansible/ansible-lint/issues/4533
7+
.ansible/

.manala.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,23 @@ project:
1919

2020
system:
2121
dir: /usr/share/ansible/collections/ansible_collections/manala/path
22+
# ansible-test needs en_US.UTF-8 locale
23+
locale: en_US.UTF-8
2224
env_file:
2325
- .env
2426
- path: .env.local
2527
required: false
28+
tmpfs:
29+
# ansible-test needs an executable /tmp
30+
- /tmp:exec
2631
git:
2732
config: |
2833
# Silence false positive dubious ownership errors
2934
[safe]
3035
directory = *
3136
ansible:
32-
version: 2.16.9
33-
config: |
34-
[defaults]
35-
force_color = True
36-
retry_files_enabled = False
37+
version: 2.18.9
3738
ansible-lint:
38-
version: 24.7.0
39+
version: 25.9.1
40+
ansible-creator:
41+
version: 25.9.0

.manala/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ sh:
4949
else \
5050
$(call manala_docker_command, \
5151
$(if $(PORT),--publish $(PORT)), \
52-
) bash --login ; \
52+
) zsh --login ; \
5353
fi
5454
.PHONY: sh
5555

.manala/docker/Dockerfile

Lines changed: 117 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,99 @@
1+
# syntax=docker/dockerfile:1
2+
13
########
24
# Base #
35
########
46

5-
FROM debian:bookworm-slim
7+
FROM debian:trixie-slim
68

79
ARG DEBIAN_FRONTEND="noninteractive"
810

911
ARG MANALA_USER_ID="1000"
1012
ARG MANALA_GROUP_ID="1000"
1113

12-
ARG GOSU_VERSION="1.17"
13-
ARG GOMPLATE_VERSION="4.1.0"
14-
ARG DIRENV_VERSION="2.34.0"
14+
ARG GOMPLATE_VERSION="4.3.3"
15+
ARG DIRENV_VERSION="2.37.1"
1516
ARG JQ_VERSION="1.7.1"
16-
ARG YQ_VERSION="4.44.3"
17+
ARG YQ_VERSION="4.48.1"
18+
ARG STARSHIP_VERSION="1.24.0"
19+
ARG FZF_VERSION="0.66.1"
1720

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

23-
# Default locale
24-
ENV LANG="C.UTF-8"
25-
26-
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
27-
28-
RUN \
29-
apt-get --quiet update \
30-
&& apt-get --quiet --yes --purge --autoremove upgrade \
31-
&& apt-get --quiet --yes --no-install-recommends --verbose-versions install \
32-
bash-completion \
33-
bzip2 \
34-
ca-certificates \
35-
curl \
36-
git \
37-
gnupg \
38-
less \
39-
libarchive-tools \
40-
make \
41-
rsync \
42-
s6 \
43-
socat \
44-
sudo \
45-
vim \
46-
# User
47-
&& addgroup --gid ${MANALA_GROUP_ID} lazy \
48-
&& adduser --home /home/lazy --shell /bin/bash --uid ${MANALA_USER_ID} --gecos lazy --ingroup lazy --disabled-password lazy \
49-
&& install --verbose --mode 0755 --group lazy --owner lazy --directory /run/user/${MANALA_USER_ID} \
50-
&& echo "lazy ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/lazy \
51-
# Gosu
52-
&& curl -sSLf "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-$(case $(dpkg --print-architecture) in "amd64") echo "amd64" ;; "arm64") echo "arm64" ;; esac)" \
53-
--output /usr/local/bin/gosu \
54-
&& chmod +x /usr/local/bin/gosu \
55-
# Gomplate
56-
&& curl -sSLf "https://github.com/hairyhenderson/gomplate/releases/download/v${GOMPLATE_VERSION}/gomplate_linux-$(case $(dpkg --print-architecture) in "amd64") echo "amd64" ;; "arm64") echo "arm64" ;; esac)" \
57-
--output /usr/local/bin/gomplate \
58-
&& chmod +x /usr/local/bin/gomplate \
59-
# Direnv
60-
&& curl -sSLf "https://github.com/direnv/direnv/releases/download/v${DIRENV_VERSION}/direnv.linux-$(case $(dpkg --print-architecture) in "amd64") echo "amd64" ;; "arm64") echo "arm64" ;; esac)" \
61-
--output /usr/local/bin/direnv \
62-
&& chmod +x /usr/local/bin/direnv \
63-
# Jq
64-
&& curl -sSLf "https://github.com/jqlang/jq/releases/download/jq-${JQ_VERSION}/jq-linux-$(case $(dpkg --print-architecture) in "amd64") echo "amd64" ;; "arm64") echo "arm64" ;; esac)" \
65-
--output /usr/local/bin/jq \
66-
&& chmod +x /usr/local/bin/jq \
67-
# Yq
68-
&& curl -sSLf "https://github.com/mikefarah/yq/releases/download/v${YQ_VERSION}/yq_linux_$(case $(dpkg --print-architecture) in "amd64") echo "amd64" ;; "arm64") echo "arm64" ;; esac)" \
69-
--output /usr/local/bin/yq \
70-
&& chmod +x /usr/local/bin/yq \
71-
# Bash completion
72-
&& install --verbose --mode 0755 --directory /etc/bash_completion.d \
73-
# Oh My Bash
74-
&& git clone https://github.com/ohmybash/oh-my-bash.git /usr/local/share/oh-my-bash \
75-
# Clean
76-
&& rm -rf /var/lib/apt/lists/*
26+
# Starship
27+
ENV STARSHIP_CONFIG=/etc/starship/starship.toml
28+
29+
SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"]
30+
31+
RUN <<EOF
32+
# Packages
33+
apt-get --quiet update
34+
apt-get --quiet --yes --purge --autoremove upgrade
35+
apt-get --quiet --yes --no-install-recommends --verbose-versions install \
36+
bzip2 \
37+
ca-certificates \
38+
curl \
39+
git \
40+
gnupg \
41+
gosu \
42+
less \
43+
libarchive-tools \
44+
make \
45+
rsync \
46+
s6 \
47+
socat \
48+
sudo \
49+
vim \
50+
zsh
51+
# Locale
52+
apt-get --quiet --yes --no-install-recommends --verbose-versions install \
53+
locales
54+
sed -i "/^# *en_US.UTF-8\b/s/^# *//" /etc/locale.gen
55+
dpkg-reconfigure locales
56+
# User
57+
addgroup --gid ${MANALA_GROUP_ID} lazy
58+
adduser --home /home/lazy --shell /bin/zsh --uid ${MANALA_USER_ID} --gecos lazy --ingroup lazy --disabled-password lazy
59+
install --verbose --mode 0755 --group lazy --owner lazy --directory /run/user/${MANALA_USER_ID}
60+
echo "lazy ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/lazy
61+
# Gomplate
62+
curl -sSLf "https://github.com/hairyhenderson/gomplate/releases/download/v${GOMPLATE_VERSION}/gomplate_linux-$(case $(dpkg --print-architecture) in "amd64") echo "amd64" ;; "arm64") echo "arm64" ;; esac)" \
63+
--output /usr/local/bin/gomplate
64+
chmod +x /usr/local/bin/gomplate
65+
# Direnv
66+
curl -sSLf "https://github.com/direnv/direnv/releases/download/v${DIRENV_VERSION}/direnv.linux-$(case $(dpkg --print-architecture) in "amd64") echo "amd64" ;; "arm64") echo "arm64" ;; esac)" \
67+
--output /usr/local/bin/direnv
68+
chmod +x /usr/local/bin/direnv
69+
# Jq
70+
curl -sSLf "https://github.com/jqlang/jq/releases/download/jq-${JQ_VERSION}/jq-linux-$(case $(dpkg --print-architecture) in "amd64") echo "amd64" ;; "arm64") echo "arm64" ;; esac)" \
71+
--output /usr/local/bin/jq
72+
chmod +x /usr/local/bin/jq
73+
# Yq
74+
curl -sSLf "https://github.com/mikefarah/yq/releases/download/v${YQ_VERSION}/yq_linux_$(case $(dpkg --print-architecture) in "amd64") echo "amd64" ;; "arm64") echo "arm64" ;; esac)" \
75+
--output /usr/local/bin/yq
76+
chmod +x /usr/local/bin/yq
77+
# Oh My Zsh
78+
git clone https://github.com/ohmyzsh/ohmyzsh.git /usr/local/share/oh-my-zsh
79+
# See: https://github.com/ohmyzsh/ohmyzsh/issues/11995
80+
git clone https://github.com/zsh-users/zsh-autosuggestions.git /usr/local/share/oh-my-zsh/custom/plugins/zsh-autosuggestions
81+
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git /usr/local/share/oh-my-zsh/custom/plugins/zsh-syntax-highlighting
82+
echo "ZDOTDIR=/etc/zsh" > /etc/zsh/zshenv
83+
# Starship
84+
curl -sSLf "https://github.com/starship/starship/releases/download/v${STARSHIP_VERSION}/starship-$(case $(dpkg --print-architecture) in "amd64") echo "x86_64" ;; "arm64") echo "aarch64" ;; esac)-unknown-linux-musl.tar.gz" \
85+
| bsdtar -xvf - -C /usr/local/bin
86+
echo "Defaults env_keep += STARSHIP_CONFIG" > /etc/sudoers.d/starship
87+
# Fzf
88+
curl -sSLf "https://github.com/junegunn/fzf/releases/download/v${FZF_VERSION}/fzf-${FZF_VERSION}-linux_$(case $(dpkg --print-architecture) in "amd64") echo "amd64" ;; "arm64") echo "arm64" ;; esac).tar.gz" \
89+
| bsdtar -xvf - -C /usr/local/bin
90+
chmod +x /usr/local/bin/fzf
91+
# Clean
92+
rm -rf /var/lib/apt/lists/*
93+
EOF
94+
95+
# Locale
96+
ENV LANG="en_US.UTF-8"
7797

7898
##########
7999
# System #
@@ -82,43 +102,49 @@ RUN \
82102
ENV PIPX_HOME="/usr/local/pipx"
83103
ENV PIPX_BIN_DIR="/usr/local/bin"
84104

85-
RUN \
86-
apt-get --quiet update \
87-
&& apt-get --quiet --yes --no-install-recommends --verbose-versions install \
88-
openssh-client \
89-
pipx \
90-
python3 \
91-
python3-argcomplete \
92-
shellcheck \
93-
sshpass \
94-
# Sudo
95-
&& echo "Defaults env_keep += \"PIPX_*\"" > /etc/sudoers.d/pipx \
96-
# Bash completion
97-
&& activate-global-python-argcomplete --dest /etc/bash_completion.d \
98-
# Clean
99-
&& rm -rf /var/lib/apt/lists/*
105+
RUN <<EOF
106+
apt-get --quiet update
107+
apt-get --quiet --yes --no-install-recommends --verbose-versions install \
108+
openssh-client \
109+
pipx \
110+
python3 \
111+
shellcheck \
112+
sshpass
113+
# Sudo
114+
echo "Defaults env_keep += \"PIPX_*\"" > /etc/sudoers.d/pipx
115+
# Clean
116+
rm -rf /var/lib/apt/lists/*
117+
EOF
100118

101119
# Ansible
102-
RUN \
103-
pipx install --pip-args="--no-cache-dir" \
104-
ansible-core==2.16.9
120+
RUN <<EOF
121+
pipx install --pip-args="--no-cache-dir" \
122+
ansible-core==2.18.9
123+
EOF
105124

106125
# Ansible Lint
107-
RUN \
108-
BUILD_PACKAGES=( \
109-
libpython3-dev gcc \
110-
) \
111-
&& apt-get --quiet update \
112-
&& apt-get --quiet --yes --no-install-recommends --verbose-versions install \
113-
"${BUILD_PACKAGES[@]}" \
114-
&& pipx install --pip-args="--no-cache-dir" \
115-
ansible-lint==24.7.0 \
116-
# Clean
117-
&& apt-get --quiet --yes --autoremove purge \
118-
"${BUILD_PACKAGES[@]}" \
119-
&& rm -rf /var/lib/apt/lists/*
126+
RUN <<EOF
127+
BUILD_PACKAGES=( \
128+
libpython3-dev gcc \
129+
)
130+
apt-get --quiet update
131+
apt-get --quiet --yes --no-install-recommends --verbose-versions install \
132+
"${BUILD_PACKAGES[@]}"
133+
pipx install --pip-args="--no-cache-dir" \
134+
ansible-lint[lock]==25.9.1
135+
# Clean
136+
apt-get --quiet --yes --autoremove purge \
137+
"${BUILD_PACKAGES[@]}"
138+
rm -rf /var/lib/apt/lists/*
139+
EOF
140+
141+
# Ansible Creator
142+
RUN <<EOF
143+
pipx install --pip-args="--no-cache-dir" \
144+
ansible-creator==25.9.0
145+
EOF
120146

121147
# Run
122148
COPY docker/entrypoint.sh /
123149
ENTRYPOINT ["/entrypoint.sh"]
124-
CMD ["bash"]
150+
CMD ["zsh"]

0 commit comments

Comments
 (0)