fix remaining packages
- testing container is starting to work on macos - still need to do testing for linux machines
This commit is contained in:
@@ -3,7 +3,7 @@ LABEL PROJECT "ansible_role_package"
|
||||
LABEL MAINTAINER "Matthew Stobbs <matthew@stobbs.ca>"
|
||||
|
||||
RUN useradd -d /home/ansible -m -G wheel ansible
|
||||
RUN dnf install -y openssh-server python3-paramiko python3-libdnf5
|
||||
RUN dnf install -y openssh-server python3-paramiko python3-libdnf5 gnupg2
|
||||
EXPOSE 22
|
||||
|
||||
USER ansible
|
||||
|
||||
10
tests/cleanup.sh
Executable file
10
tests/cleanup.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
IMAGE=packagetest
|
||||
CONTAINER=packagetest
|
||||
MACHINENAME=podman-machine-default
|
||||
|
||||
ssh-keygen -R "[127.0.0.1]:2222"
|
||||
podman stop $CONTAINER
|
||||
podman rm $IMAGE
|
||||
podman machine stop $MACHINENAME
|
||||
23
tests/setup.sh
Executable file
23
tests/setup.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
IMAGE=packagetest
|
||||
CONTAINER=packagetest
|
||||
MACHINENAME=podman-machine-default
|
||||
|
||||
function machine_state {
|
||||
echo $(podman machine inspect $MACHINENAME | jq -r '.[].State')
|
||||
}
|
||||
|
||||
echo "Starting $MACHINENAME"
|
||||
podman machine start -q $MACHINENAME
|
||||
while [ "$(machine_state)" != "running" ]
|
||||
do
|
||||
echo $(machine_state)
|
||||
echo "Wating for $MACHINENAME to start"
|
||||
sleep 1
|
||||
done
|
||||
|
||||
echo "Machine $MACHINENAME running"
|
||||
|
||||
echo "Building container images"
|
||||
podman build --platform linux/amd64 -f Containerfile -t $IMAGE .
|
||||
4
tests/test.sh
Executable file
4
tests/test.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
podman run --rm -it -d --platform linux/amd64 --name packagetest -p 2222:22 packagetest
|
||||
ansible-playbook test_not_local.yml -i inventory.yml
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
remote_user: root
|
||||
roles:
|
||||
- role: ansible_role_package
|
||||
vars:
|
||||
use_local: false
|
||||
packages:
|
||||
- air
|
||||
- ansible-language-server
|
||||
112
tests/test_not_local.yml
Normal file
112
tests/test_not_local.yml
Normal file
@@ -0,0 +1,112 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
vars:
|
||||
testpkgs:
|
||||
- air
|
||||
- alacritty
|
||||
- ansible-language-server
|
||||
- ansible-lint
|
||||
- ansible
|
||||
- bashls
|
||||
- bat
|
||||
- bitwarden
|
||||
- blender
|
||||
- broot
|
||||
- btop
|
||||
- buf
|
||||
- bufls
|
||||
- carapace
|
||||
- cheat
|
||||
- checkmake
|
||||
- choose
|
||||
- clangd
|
||||
- cmake
|
||||
- cmakelang
|
||||
- commitlint-cli
|
||||
- commitlint-config-conventional
|
||||
- consul
|
||||
- cssls
|
||||
- curlie
|
||||
- dbeaver
|
||||
- direnv
|
||||
- dockerls
|
||||
- dotenv-linter
|
||||
- duf
|
||||
- dust
|
||||
- editorconfig
|
||||
- eslint
|
||||
- eza
|
||||
- fd
|
||||
- firefox
|
||||
- flatpak
|
||||
- fzf
|
||||
- ghostty
|
||||
- git
|
||||
- glow
|
||||
- go
|
||||
- godot
|
||||
- gopls
|
||||
- gping
|
||||
- heroic
|
||||
- htmlls
|
||||
- htmx-lsp
|
||||
- httpie
|
||||
- hugo
|
||||
- hyperfine
|
||||
- intelephense
|
||||
- jinja-lsp
|
||||
- jq
|
||||
- jsonls
|
||||
- kitty
|
||||
- lazygit
|
||||
- libreoffice
|
||||
- lua-language-server
|
||||
- markdownlint-cli
|
||||
- mcfly
|
||||
- neovide
|
||||
- neovim
|
||||
- nerdfonts
|
||||
- nextcloud
|
||||
- nginxls
|
||||
- nodejs
|
||||
- nomad
|
||||
- packer
|
||||
- pandoc
|
||||
- pgadmin
|
||||
- pipx
|
||||
- podman
|
||||
- pyright
|
||||
- python3
|
||||
- quobix-vacuum
|
||||
- revive
|
||||
- ripgrep
|
||||
- rust
|
||||
- sd
|
||||
- sqlfluff
|
||||
- sqlls
|
||||
- starship
|
||||
- stow
|
||||
- tailscale
|
||||
- tailwindcss-languageserver
|
||||
- templ
|
||||
- terraform
|
||||
- terraformls
|
||||
- thunderbird
|
||||
- tidy
|
||||
- tldr
|
||||
- tmux
|
||||
- vault
|
||||
- xh
|
||||
- yamlls
|
||||
- zfs
|
||||
- zig
|
||||
- zls
|
||||
- zoxide
|
||||
- zsh
|
||||
tasks:
|
||||
- name: Test all packages with use_local=false
|
||||
ansible.builtin.include_role:
|
||||
name: ansible_role_package
|
||||
vars:
|
||||
use_local: false
|
||||
packages: "{{ testpkgs }}"
|
||||
Reference in New Issue
Block a user