mirror of
https://github.com/thegeeklab/ansible-later.git
synced 2024-11-28 07:40:36 +00:00
BREAKING CHANGE: make ansible and ansible-base an optional extra dependency (#53)
This commit is contained in:
parent
98ebe1361c
commit
9f6772d062
@ -6,13 +6,13 @@ local PythonVersion(pyversion='3.6') = {
|
|||||||
},
|
},
|
||||||
commands: [
|
commands: [
|
||||||
'pip install poetry poetry-dynamic-versioning -qq',
|
'pip install poetry poetry-dynamic-versioning -qq',
|
||||||
'poetry install -q',
|
'poetry install -q -E ansible-base',
|
||||||
'poetry run pytest ansiblelater --cov=ansiblelater --cov-append --no-cov-on-fail',
|
'poetry run pytest ansiblelater --cov=ansiblelater --cov-append --no-cov-on-fail',
|
||||||
'poetry version',
|
'poetry version',
|
||||||
'poetry run ansible-later --help',
|
'poetry run ansible-later --help',
|
||||||
],
|
],
|
||||||
depends_on: [
|
depends_on: [
|
||||||
'clone',
|
'fetch',
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ local PipelineLint = {
|
|||||||
commands: [
|
commands: [
|
||||||
'git fetch -tq',
|
'git fetch -tq',
|
||||||
'pip install poetry poetry-dynamic-versioning -qq',
|
'pip install poetry poetry-dynamic-versioning -qq',
|
||||||
'poetry install -q',
|
'poetry install -q -E ansible-base',
|
||||||
'poetry run flake8 ./ansiblelater',
|
'poetry run flake8 ./ansiblelater',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@ -109,7 +109,7 @@ local PipelineSecurity = {
|
|||||||
commands: [
|
commands: [
|
||||||
'git fetch -tq',
|
'git fetch -tq',
|
||||||
'pip install poetry poetry-dynamic-versioning -qq',
|
'pip install poetry poetry-dynamic-versioning -qq',
|
||||||
'poetry install -q',
|
'poetry install -q -E ansible-base',
|
||||||
'poetry run bandit -r ./ansiblelater -x ./ansiblelater/test',
|
'poetry run bandit -r ./ansiblelater -x ./ansiblelater/test',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
22
.drone.yml
22
.drone.yml
@ -12,7 +12,7 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- git fetch -tq
|
- git fetch -tq
|
||||||
- pip install poetry poetry-dynamic-versioning -qq
|
- pip install poetry poetry-dynamic-versioning -qq
|
||||||
- poetry install -q
|
- poetry install -q -E ansible-base
|
||||||
- poetry run flake8 ./ansiblelater
|
- poetry run flake8 ./ansiblelater
|
||||||
environment:
|
environment:
|
||||||
PY_COLORS: 1
|
PY_COLORS: 1
|
||||||
@ -44,53 +44,53 @@ steps:
|
|||||||
image: python:3.6
|
image: python:3.6
|
||||||
commands:
|
commands:
|
||||||
- pip install poetry poetry-dynamic-versioning -qq
|
- pip install poetry poetry-dynamic-versioning -qq
|
||||||
- poetry install -q
|
- poetry install -q -E ansible-base
|
||||||
- poetry run pytest ansiblelater --cov=ansiblelater --cov-append --no-cov-on-fail
|
- poetry run pytest ansiblelater --cov=ansiblelater --cov-append --no-cov-on-fail
|
||||||
- poetry version
|
- poetry version
|
||||||
- poetry run ansible-later --help
|
- poetry run ansible-later --help
|
||||||
environment:
|
environment:
|
||||||
PY_COLORS: 1
|
PY_COLORS: 1
|
||||||
depends_on:
|
depends_on:
|
||||||
- clone
|
- fetch
|
||||||
|
|
||||||
- name: python37-pytest
|
- name: python37-pytest
|
||||||
image: python:3.7
|
image: python:3.7
|
||||||
commands:
|
commands:
|
||||||
- pip install poetry poetry-dynamic-versioning -qq
|
- pip install poetry poetry-dynamic-versioning -qq
|
||||||
- poetry install -q
|
- poetry install -q -E ansible-base
|
||||||
- poetry run pytest ansiblelater --cov=ansiblelater --cov-append --no-cov-on-fail
|
- poetry run pytest ansiblelater --cov=ansiblelater --cov-append --no-cov-on-fail
|
||||||
- poetry version
|
- poetry version
|
||||||
- poetry run ansible-later --help
|
- poetry run ansible-later --help
|
||||||
environment:
|
environment:
|
||||||
PY_COLORS: 1
|
PY_COLORS: 1
|
||||||
depends_on:
|
depends_on:
|
||||||
- clone
|
- fetch
|
||||||
|
|
||||||
- name: python38-pytest
|
- name: python38-pytest
|
||||||
image: python:3.8
|
image: python:3.8
|
||||||
commands:
|
commands:
|
||||||
- pip install poetry poetry-dynamic-versioning -qq
|
- pip install poetry poetry-dynamic-versioning -qq
|
||||||
- poetry install -q
|
- poetry install -q -E ansible-base
|
||||||
- poetry run pytest ansiblelater --cov=ansiblelater --cov-append --no-cov-on-fail
|
- poetry run pytest ansiblelater --cov=ansiblelater --cov-append --no-cov-on-fail
|
||||||
- poetry version
|
- poetry version
|
||||||
- poetry run ansible-later --help
|
- poetry run ansible-later --help
|
||||||
environment:
|
environment:
|
||||||
PY_COLORS: 1
|
PY_COLORS: 1
|
||||||
depends_on:
|
depends_on:
|
||||||
- clone
|
- fetch
|
||||||
|
|
||||||
- name: python39-pytest
|
- name: python39-pytest
|
||||||
image: python:3.9
|
image: python:3.9
|
||||||
commands:
|
commands:
|
||||||
- pip install poetry poetry-dynamic-versioning -qq
|
- pip install poetry poetry-dynamic-versioning -qq
|
||||||
- poetry install -q
|
- poetry install -q -E ansible-base
|
||||||
- poetry run pytest ansiblelater --cov=ansiblelater --cov-append --no-cov-on-fail
|
- poetry run pytest ansiblelater --cov=ansiblelater --cov-append --no-cov-on-fail
|
||||||
- poetry version
|
- poetry version
|
||||||
- poetry run ansible-later --help
|
- poetry run ansible-later --help
|
||||||
environment:
|
environment:
|
||||||
PY_COLORS: 1
|
PY_COLORS: 1
|
||||||
depends_on:
|
depends_on:
|
||||||
- clone
|
- fetch
|
||||||
|
|
||||||
- name: codecov
|
- name: codecov
|
||||||
image: python:3.9
|
image: python:3.9
|
||||||
@ -133,7 +133,7 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- git fetch -tq
|
- git fetch -tq
|
||||||
- pip install poetry poetry-dynamic-versioning -qq
|
- pip install poetry poetry-dynamic-versioning -qq
|
||||||
- poetry install -q
|
- poetry install -q -E ansible-base
|
||||||
- poetry run bandit -r ./ansiblelater -x ./ansiblelater/test
|
- poetry run bandit -r ./ansiblelater -x ./ansiblelater/test
|
||||||
environment:
|
environment:
|
||||||
PY_COLORS: 1
|
PY_COLORS: 1
|
||||||
@ -666,6 +666,6 @@ depends_on:
|
|||||||
|
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: f039be0892759b19796f490abe2d3b220309cd76899c6dfd43466ea23398dd07
|
hmac: eaff1a423a2b5218072b02e07b60be3fab4aa4da5908ddd750469fa9b15434a4
|
||||||
|
|
||||||
...
|
...
|
||||||
|
@ -14,7 +14,7 @@ ADD dist/ansible_later-*.whl /
|
|||||||
RUN apk --update add --virtual .build-deps build-base libffi-dev libressl-dev && \
|
RUN apk --update add --virtual .build-deps build-base libffi-dev libressl-dev && \
|
||||||
apk --update add git && \
|
apk --update add git && \
|
||||||
pip install --upgrade --no-cache-dir pip && \
|
pip install --upgrade --no-cache-dir pip && \
|
||||||
pip install --no-cache-dir ansible_later-*.whl && \
|
pip install --no-cache-dir $(find / -name "ansible_later-*.whl")[ansible-base] && \
|
||||||
apk del .build-deps && \
|
apk del .build-deps && \
|
||||||
rm -f ansible_later-*.whl && \
|
rm -f ansible_later-*.whl && \
|
||||||
rm -rf /var/cache/apk/* && \
|
rm -rf /var/cache/apk/* && \
|
||||||
|
@ -14,7 +14,7 @@ ADD dist/ansible_later-*.whl /
|
|||||||
RUN apk --update add --virtual .build-deps build-base libffi-dev libressl-dev && \
|
RUN apk --update add --virtual .build-deps build-base libffi-dev libressl-dev && \
|
||||||
apk --update add git && \
|
apk --update add git && \
|
||||||
pip install --upgrade --no-cache-dir pip && \
|
pip install --upgrade --no-cache-dir pip && \
|
||||||
pip install --no-cache-dir ansible_later-*.whl && \
|
pip install --no-cache-dir $(find / -name "ansible_later-*.whl")[ansible-base] && \
|
||||||
apk del .build-deps && \
|
apk del .build-deps && \
|
||||||
rm -f ansible_later-*.whl && \
|
rm -f ansible_later-*.whl && \
|
||||||
rm -rf /var/cache/apk/* && \
|
rm -rf /var/cache/apk/* && \
|
||||||
|
@ -14,7 +14,7 @@ ADD dist/ansible_later-*.whl /
|
|||||||
RUN apk --update add --virtual .build-deps build-base libffi-dev libressl-dev && \
|
RUN apk --update add --virtual .build-deps build-base libffi-dev libressl-dev && \
|
||||||
apk --update add git && \
|
apk --update add git && \
|
||||||
pip install --upgrade --no-cache-dir pip && \
|
pip install --upgrade --no-cache-dir pip && \
|
||||||
pip install --no-cache-dir ansible_later-*.whl && \
|
pip install --no-cache-dir $(find / -name "ansible_later-*.whl")[ansible-base] && \
|
||||||
apk del .build-deps && \
|
apk del .build-deps && \
|
||||||
rm -f ansible_later-*.whl && \
|
rm -f ansible_later-*.whl && \
|
||||||
rm -rf /var/cache/apk/* && \
|
rm -rf /var/cache/apk/* && \
|
||||||
|
@ -2,15 +2,17 @@
|
|||||||
title: Using pip
|
title: Using pip
|
||||||
---
|
---
|
||||||
|
|
||||||
|
ansible-later requires a working Ansible installation. If Ansible is not already installed on your system you can to install `ansible-later` with one of the optional dependency groups `ansible` or `ansible-base`.
|
||||||
|
|
||||||
<!-- prettier-ignore-start -->
|
<!-- prettier-ignore-start -->
|
||||||
<!-- markdownlint-disable -->
|
<!-- markdownlint-disable -->
|
||||||
<!-- spellchecker-disable -->
|
<!-- spellchecker-disable -->
|
||||||
{{< highlight Shell "linenos=table" >}}
|
{{< highlight Shell "linenos=table" >}}
|
||||||
# From pip as user
|
# From pip as user
|
||||||
pip install ansible-later --user
|
pip install ansible-later[ansible] --user # or ansible-later[ansible-base]
|
||||||
|
|
||||||
# .. or as root
|
# .. or as root
|
||||||
sudo pip install ansible-later
|
sudo pip install ansible-later[ansible] # or ansible-later[ansible-base]
|
||||||
{{< /highlight >}}
|
{{< /highlight >}}
|
||||||
<!-- spellchecker-enable -->
|
<!-- spellchecker-enable -->
|
||||||
<!-- markdownlint-restore -->
|
<!-- markdownlint-restore -->
|
||||||
|
@ -6,10 +6,12 @@ title: From source
|
|||||||
<!-- markdownlint-disable -->
|
<!-- markdownlint-disable -->
|
||||||
<!-- spellchecker-disable -->
|
<!-- spellchecker-disable -->
|
||||||
{{< highlight Shell "linenos=table" >}}
|
{{< highlight Shell "linenos=table" >}}
|
||||||
# Install dependency
|
# Install dependencies
|
||||||
|
pip install --user poetry
|
||||||
|
|
||||||
git clone https://github.com/thegeeklab/ansible-later
|
git clone https://github.com/thegeeklab/ansible-later
|
||||||
export PYTHONPATH=$PYTHONPATH:`pwd`/ansible-later/ansiblelater
|
cd ansible-later
|
||||||
export PATH=$PATH:`pwd`/ansible-later/bin
|
poetry install -E ansible
|
||||||
{{< /highlight >}}
|
{{< /highlight >}}
|
||||||
<!-- spellchecker-enable -->
|
<!-- spellchecker-enable -->
|
||||||
<!-- markdownlint-restore -->
|
<!-- markdownlint-restore -->
|
||||||
|
20
poetry.lock
generated
20
poetry.lock
generated
@ -3,7 +3,7 @@ name = "ansible"
|
|||||||
version = "2.10.4"
|
version = "2.10.4"
|
||||||
description = "Radically simple IT automation"
|
description = "Radically simple IT automation"
|
||||||
category = "main"
|
category = "main"
|
||||||
optional = false
|
optional = true
|
||||||
python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*"
|
python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*"
|
||||||
|
|
||||||
[package.dependencies]
|
[package.dependencies]
|
||||||
@ -14,7 +14,7 @@ name = "ansible-base"
|
|||||||
version = "2.10.4"
|
version = "2.10.4"
|
||||||
description = "Radically simple IT automation"
|
description = "Radically simple IT automation"
|
||||||
category = "main"
|
category = "main"
|
||||||
optional = false
|
optional = true
|
||||||
python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*"
|
python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*"
|
||||||
|
|
||||||
[package.dependencies]
|
[package.dependencies]
|
||||||
@ -89,7 +89,7 @@ name = "cffi"
|
|||||||
version = "1.14.4"
|
version = "1.14.4"
|
||||||
description = "Foreign Function Interface for Python calling C code."
|
description = "Foreign Function Interface for Python calling C code."
|
||||||
category = "main"
|
category = "main"
|
||||||
optional = false
|
optional = true
|
||||||
python-versions = "*"
|
python-versions = "*"
|
||||||
|
|
||||||
[package.dependencies]
|
[package.dependencies]
|
||||||
@ -119,7 +119,7 @@ name = "cryptography"
|
|||||||
version = "3.3.1"
|
version = "3.3.1"
|
||||||
description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers."
|
description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers."
|
||||||
category = "main"
|
category = "main"
|
||||||
optional = false
|
optional = true
|
||||||
python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*"
|
python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*"
|
||||||
|
|
||||||
[package.dependencies]
|
[package.dependencies]
|
||||||
@ -337,7 +337,7 @@ name = "jinja2"
|
|||||||
version = "2.11.2"
|
version = "2.11.2"
|
||||||
description = "A very fast and expressive template engine."
|
description = "A very fast and expressive template engine."
|
||||||
category = "main"
|
category = "main"
|
||||||
optional = false
|
optional = true
|
||||||
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
|
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
|
||||||
|
|
||||||
[package.dependencies]
|
[package.dependencies]
|
||||||
@ -369,7 +369,7 @@ name = "markupsafe"
|
|||||||
version = "1.1.1"
|
version = "1.1.1"
|
||||||
description = "Safely add untrusted strings to HTML/XML markup."
|
description = "Safely add untrusted strings to HTML/XML markup."
|
||||||
category = "main"
|
category = "main"
|
||||||
optional = false
|
optional = true
|
||||||
python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*"
|
python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -464,7 +464,7 @@ name = "pycparser"
|
|||||||
version = "2.20"
|
version = "2.20"
|
||||||
description = "C parser in Python"
|
description = "C parser in Python"
|
||||||
category = "main"
|
category = "main"
|
||||||
optional = false
|
optional = true
|
||||||
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
|
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -682,10 +682,14 @@ python-versions = ">=3.6"
|
|||||||
docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"]
|
docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"]
|
||||||
testing = ["pytest (>=3.5,!=3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "jaraco.test (>=3.2.0)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"]
|
testing = ["pytest (>=3.5,!=3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "jaraco.test (>=3.2.0)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"]
|
||||||
|
|
||||||
|
[extras]
|
||||||
|
ansible = ["ansible"]
|
||||||
|
ansible-base = ["ansible-base"]
|
||||||
|
|
||||||
[metadata]
|
[metadata]
|
||||||
lock-version = "1.1"
|
lock-version = "1.1"
|
||||||
python-versions = "^3.6.0"
|
python-versions = "^3.6.0"
|
||||||
content-hash = "f1621f72227f6a5195fc42b7090361de9f8f3a5b63a708554a989cc1f4ac9923"
|
content-hash = "0b1ffb2e3c052af62df296fcc2be7a681eeefaeff12614c951937c32fe28bb28"
|
||||||
|
|
||||||
[metadata.files]
|
[metadata.files]
|
||||||
ansible = [
|
ansible = [
|
||||||
|
@ -35,6 +35,8 @@ version = "0.0.0"
|
|||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
PyYAML = "^5.3.1"
|
PyYAML = "^5.3.1"
|
||||||
|
ansible = {version = "^2.10.4", optional = true}
|
||||||
|
ansible-base = {version = "^2.10.4", optional = true}
|
||||||
anyconfig = "^0.9.11"
|
anyconfig = "^0.9.11"
|
||||||
appdirs = "^1.4.4"
|
appdirs = "^1.4.4"
|
||||||
colorama = "^0.4.4"
|
colorama = "^0.4.4"
|
||||||
@ -48,8 +50,6 @@ six = "^1.15.0"
|
|||||||
toolz = "^0.11.1"
|
toolz = "^0.11.1"
|
||||||
unidiff = "^0.6.0"
|
unidiff = "^0.6.0"
|
||||||
yamllint = "^1.25.0"
|
yamllint = "^1.25.0"
|
||||||
ansible = {version = "^2.10.4", extras = ["ansible"]}
|
|
||||||
ansible-base = {version = "^2.10.4", extras = ["ansible-base"]}
|
|
||||||
|
|
||||||
[tool.poetry.dev-dependencies]
|
[tool.poetry.dev-dependencies]
|
||||||
bandit = "^1.7.0"
|
bandit = "^1.7.0"
|
||||||
@ -72,6 +72,10 @@ pytest-mock = "^3.4.0"
|
|||||||
wheel = "^0.36.2"
|
wheel = "^0.36.2"
|
||||||
yapf = "^0.30.0"
|
yapf = "^0.30.0"
|
||||||
|
|
||||||
|
[tool.poetry.extras]
|
||||||
|
ansible = ["ansible"]
|
||||||
|
ansible-base = ["ansible-base"]
|
||||||
|
|
||||||
[tool.poetry.scripts]
|
[tool.poetry.scripts]
|
||||||
ansible-later = "ansiblelater.__main__:main"
|
ansible-later = "ansiblelater.__main__:main"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user