diff options
author | pmikus <pmikus@cisco.com> | 2021-04-08 10:44:18 +0000 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2021-04-08 11:17:15 +0000 |
commit | df5672b3d9c29b51397f4770eb992c9f3f3955ce (patch) | |
tree | adb4cf36c9b680ebbc44c953391a0d21b986d6b7 /fdio.infra.ansible/roles/python_env | |
parent | 8018da98e0f362bc69fc9600fac222a86fd46b5e (diff) |
Ansible git move
+ Better accessibility
+ Compliant with fdio.infra._function_
- function [pxe|terraform|ansible|vagrant]
+ dill==0.3.3 also applied on TBs
- ci-man to follow today
- Docs to be updated in separate patch
Signed-off-by: pmikus <pmikus@cisco.com>
Change-Id: Iff9eaa29d63044188cc8160db2d9b44b7635782a
Diffstat (limited to 'fdio.infra.ansible/roles/python_env')
-rw-r--r-- | fdio.infra.ansible/roles/python_env/defaults/main.yaml | 41 | ||||
-rw-r--r-- | fdio.infra.ansible/roles/python_env/tasks/main.yaml | 82 |
2 files changed, 123 insertions, 0 deletions
diff --git a/fdio.infra.ansible/roles/python_env/defaults/main.yaml b/fdio.infra.ansible/roles/python_env/defaults/main.yaml new file mode 100644 index 0000000000..342d1c3d33 --- /dev/null +++ b/fdio.infra.ansible/roles/python_env/defaults/main.yaml @@ -0,0 +1,41 @@ +--- +# file: roles/common/defaults/main.yaml + +packages: "{{ packages_base + packages_by_distro[ansible_distribution|lower][ansible_distribution_release] + packages_by_arch[ansible_machine] }}" + +packages_base: + - "virtualenv" + +packages_by_distro: + ubuntu: + bionic: + - "python-all" + - "python-apt" + - "python-cffi" + - "python-cffi-backend" + - "python-dev" + - "python-pip" + - "python-setuptools" + - "python3-all" + - "python3-apt" + - "python3-cffi" + - "python3-cffi-backend" + - "python3-dev" + - "python3-pip" + - "python3-pyelftools" + - "python3-setuptools" + focal: + - "python3-all" + - "python3-apt" + - "python3-cffi" + - "python3-cffi-backend" + - "python3-dev" + - "python3-pip" + - "python3-pyelftools" + - "python3-setuptools" + +packages_by_arch: + aarch64: + - [] + x86_64: + - []
\ No newline at end of file diff --git a/fdio.infra.ansible/roles/python_env/tasks/main.yaml b/fdio.infra.ansible/roles/python_env/tasks/main.yaml new file mode 100644 index 0000000000..cddfe63655 --- /dev/null +++ b/fdio.infra.ansible/roles/python_env/tasks/main.yaml @@ -0,0 +1,82 @@ +--- +# file: roles/python_env/tasks/main.yaml + +- name: Inst - Update package cache (apt) + apt: + update_cache: yes + cache_valid_time: 3600 + when: + - ansible_distribution|lower == 'ubuntu' + tags: + - common-inst-prerequisites + +- name: Inst - Prerequisites + package: + name: "{{ packages | flatten(levels=1) }}" + state: latest + tags: + - common-inst-prerequisites + +- name: Inst - CSIT PIP requirements + pip: + name: + - "ecdsa==0.13.3" + - "paramiko==2.6.0" + - "pycrypto==2.6.1" + - "pypcap==1.2.3" + - "PyYAML==5.1.1" + - "requests==2.22.0" + - "robotframework==3.1.2" + - "scapy==2.4.3" + - "scp==0.13.2" + - "ansible==2.10.7" + - "dill==0.3.3" + - "numpy==1.17.3" + - "hdrhistogram==0.6.1" + - "plotly==4.1.1" + - "PTable==0.9.2" + - "Sphinx==2.2.1" + - "sphinx-rtd-theme==0.4.0" + - "sphinxcontrib-programoutput==0.15" + - "sphinxcontrib-robotdoc==0.11.0" + - "alabaster==0.7.12" + - "Babel==2.7.0" + - "bcrypt==3.1.7" + - "certifi==2019.9.11" + - "cffi==1.13.2" + - "chardet==3.0.4" + - "cryptography==2.8" + - "docutils==0.15.2" + - "future==0.18.2" + - "idna==2.8" + - "imagesize==1.1.0" + - "Jinja2==2.10.3" + - "MarkupSafe==1.1.1" + - "packaging==19.2" + - "pbr==5.4.3" + - "pycparser==2.19" + - "Pygments==2.4.2" + - "PyNaCl==1.3.0" + - "pyparsing==2.4.4" + - "python-dateutil==2.8.1" + - "pytz==2019.3" + - "retrying==1.3.3" + - "six==1.13.0" + - "snowballstemmer==2.0.0" + - "sphinxcontrib-applehelp==1.0.1" + - "sphinxcontrib-devhelp==1.0.1" + - "sphinxcontrib-htmlhelp==1.0.2" + - "sphinxcontrib-jsmath==1.0.1" + - "sphinxcontrib-qthelp==1.0.2" + - "sphinxcontrib-serializinghtml==1.1.3" + - "urllib3==1.25.6" + tags: + - common-inst-pip + +- name: Inst - CSIT PIP requirements - Pandas and SciPy workaround + pip: + name: + - "pandas==0.25.3" + - "scipy==1.5.4" + tags: + - common-inst-pip |