feat: deprecate venv requirement, use pipx instead

This commit is contained in:
Marc 2024-07-27 09:47:10 -04:00
parent 372fc636d7
commit af064121c4
Signed by: marc
GPG key ID: 048E042F22B5DC79
4 changed files with 24 additions and 16 deletions

View file

@ -4,7 +4,9 @@ Environment tweaks for everyday happiness.
## Setup
Use the `bootstrap.sh` script to set up a virtual environment with Ansible and its dependencies, then `setup.sh`!
Just run `./setup.sh`!
_Note_: This expects `pipx` to be installed on your system.
## Contributing

View file

@ -1,9 +0,0 @@
#!/usr/bin/bash
VENV=env.venv
python -m venv "$VENV"
. "$VENV/bin/activate"
pip install -U pip ansible~=9.5

View file

@ -1,6 +1,9 @@
# Marc's env managed block - BEGIN
format = """
[](bold green) \
[](#9A348E)\
$username\
$username$hostname\
$os\
[](bg:#33658a fg:#9A348E)\
$time\
@ -11,12 +14,12 @@ $git_branch\
$git_status\
[](fg:#4208e0 bg:#9A348E)\
$python\
[](fg:#9A348E)
>
[](fg:#9A348E)
[ ](bold green)
"""
# Disable the blank line at the start of the prompt
add_newline = true
add_newline = false
[python]
style = "bg:#9A348E"
@ -32,6 +35,11 @@ style_root = "bg:#9A348E"
format = '[$user]($style)'
disabled = false
[hostname]
format = '[@$hostname ]($style)'
style = "bg:#9A348E"
ssh_only = false
# An alternative to the username module which displays a symbol that
# represents the current operating system
[os]
@ -71,3 +79,4 @@ time_format = "%T"
style = "bg:#33658A"
format = '[ $time ]($style)'
disabled = false
# Marc's env managed block - END

View file

@ -1,3 +1,9 @@
#!/bin/bash
ansible-playbook playbook.yml -v --ask-become-pass
if [[ -z "$(command -v pipx)" ]]; then
echo -e "\033[31;1mThis expects pipx to be installed.\033[0m"
exit 1
fi
pipx install "ansible~=10.0"
ansible-playbook -v --ask-become-pass ./playbook.yml