forked from oravirt/ansible-oracle
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python-venv: helper for easier development in ansible-oracle
- Loading branch information
Showing
7 changed files
with
126 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
ansible-navigator: | ||
execution-environment: | ||
enabled: false | ||
environment-variables: | ||
set: | ||
ANSIBLE_CONFIG: ansible.cfg | ||
logging: | ||
level: warning | ||
mode: stdout | ||
playbook-artifact: | ||
enable: true | ||
replay: "{playbook_dir}/../navigator/replay/{playbook_name}-{time_stamp}.json" | ||
save-as: "{playbook_dir}/../navigator/replay/{playbook_name}-{time_stamp}.json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
minor_changes: | ||
- "python-venv: helper for easier development in ansible-oracle (oravirt#318)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/usr/bin/env bash | ||
set -eu | ||
set -o pipefail | ||
|
||
basedir=$(dirname -- "$0") | ||
|
||
########################## | ||
##### ansible-oracle ##### | ||
########################## | ||
|
||
echo "venv for ansible-oracle" | ||
venv_dir=~/venv/ansible-oracle | ||
test -d "${venv_dir}" 2>/dev/null || python3 -m venv "${venv_dir}" | ||
|
||
# shellcheck source=/dev/null | ||
source "${venv_dir}"/bin/activate | ||
|
||
echo "install pip modules" | ||
pip --require-virtualenv install -q -r "${basedir}/requirements_dev.txt" | ||
pip list | ||
|
||
########################## | ||
##### ansible-doctor ##### | ||
########################## | ||
|
||
echo "venv for ansible-doctor" | ||
venv_dir=~/venv/ansible-doctor | ||
test -d "${venv_dir}" 2>/dev/null || python3 -m venv "${venv_dir}" | ||
|
||
# shellcheck source=/dev/null | ||
source "${venv_dir}"/bin/activate | ||
|
||
echo "install pip modules" | ||
pip --require-virtualenv install -q -r "${basedir}/requirements_doctor.txt" | ||
pip list | ||
|
||
############################### | ||
##### antsibull-changelog ##### | ||
############################### | ||
|
||
echo "venv for antsibull-changelog" | ||
venv_dir=~/venv/antsibull | ||
test -d "${venv_dir}" 2>/dev/null || python3 -m venv "${venv_dir}" | ||
|
||
# shellcheck source=/dev/null | ||
source "${venv_dir}"/bin/activate | ||
|
||
echo "install pip modules" | ||
pip --require-virtualenv install -q -r "${basedir}/requirements_antsibull.txt" | ||
pip list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# | ||
# This file is needed for antsibull-changelog | ||
# | ||
# create python-venv: | ||
# python3 -m venv ~/venv/antsibull | ||
# | ||
# install with: | ||
# . ~/venv/antsibull/bin/activate | ||
# pip --require-virtualenv -v install -r tools/dev/requirements_ansibull.txt | ||
# | ||
# execute antsibull-changelog: | ||
# ~/venv/antsibull/bin/antsibull-changelog | ||
# | ||
# older version of ansible is needed for ansible-oracle | ||
# otherwise the ansible-doc gets errors due to problems with ansible-oracle-modules | ||
# They need some refactoring... | ||
ansible-core==2.15.4 | ||
antsibull-changelog==0.23.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# | ||
# This file is for all developer who wants to use the usual tools in ansible-oracle. | ||
# | ||
# pip modules for ansible-oracle development | ||
# Important: | ||
# Make sure to use Python >= 3.9 for ansible-lint. | ||
# | ||
# create python-venv: | ||
# python3 -m venv ~/venv/ansible-oracle | ||
# | ||
# install with: | ||
# . ~/venv/ansible-oracle/bin/activate | ||
# pip --require-virtualenv -v install -r tools/dev/requirements_dev.txt | ||
# | ||
# ansible-doctor==2.0.3 | ||
ansible-lint==6.16.0 | ||
ansible-navigator==3.3.1 | ||
pre-commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# | ||
# This file is needed for ansible-doctor | ||
# Due to dependency issues between ansible-lint and ansible-doctor, | ||
# a dedicated venv is needed for ansible-doctor. | ||
# See following issue for reason: | ||
# https://github.com/thegeeklab/ansible-doctor/issues/495 | ||
# | ||
# create python-venv: | ||
# python3 -m venv ~/venv/ansible-doctor | ||
# | ||
# install with: | ||
# . ~/venv/ansible-doctor/bin/activate | ||
# pip --require-virtualenv -v install -r tools/dev/requirements_doctor.txt | ||
# | ||
# execute ansible-doctor: | ||
# ~/venv/ansible-doctor/bin/ansible-doctor | ||
# | ||
ansible-doctor==2.0.4 |