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

View file

@ -1,3 +1,9 @@
#!/bin/bash #!/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