This file contains hidden or 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
| from rich.console import Console | |
| from subprocess import run | |
| import tempfile | |
| import sys | |
| from contextlib import redirect_stdout, redirect_stderr | |
| # If we do not pass file=sys.stdout explicitly, rich output will also be | |
| # captured by the context manager. | |
| console = Console(file=sys.stdout) | |
| console_err = Console(file=sys.stderr, stderr=True) |
This file contains hidden or 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
| #!/usr/bin/env ansible-playbook -i hosts | |
| --- | |
| - hosts: all | |
| gather_facts: no | |
| tasks: | |
| - name: values without gather_facts | |
| debug: | |
| msg: | | |
| ansible_host = {{ ansible_host }} | |
| ansible_hostname = {{ ansible_hostname | default('*undefined*') }} |
This file contains hidden or 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
| $ pytest -vvvv --only-container --container-engine=docker --image-name community-ansible-dev-tools:test -k test_builder | |
| /Volumes/code/a/ansible-dev-tools/tests/conftest.py:316: UserWarning: Running: docker run -d --rm --device "/dev/fuse" -e NO_COLOR=1 --hostname=ansible-dev-container --name=adt-test-container -p 8001:8001 -v $PWD:/workdir --user=root --privileged community-ansible-dev-tools:test adt server --port 8001 | |
| warnings.warn("Running: " + cmd, stacklevel=0) | |
| /Volumes/code/a/ansible-dev-tools/tests/conftest.py:335: UserWarning: localhost / . not in image name, pulling default ghcr.io/ansible/community-ansible-dev-tools:latest for navigator | |
| warnings.warn(warning, stacklevel=0) | |
| ========================================================================================= test session starts ========================================================================================= | |
| platform darwin -- Python 3.12.7, pytest-8.3.3, pluggy-1.5.0 -- /Users/ssbarnea/.asdf/installs/python/3.12.7/bin/pyth |
This file contains hidden or 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
| $ ansible-test coverage report --omit='.tox/**/*' --omit='tests/*' --color --all --show-missing -v | |
| Configured locale: en_US.UTF-8 | |
| Creating container database. | |
| Generated combined output: /Users/ssbarnea/c/a/ansible_collections/ansible/eda/tests/output/coverage/coverage | |
| Initializing "/tmp/ansible-test-k1bkiczg-injector" as the temporary injector directory. | |
| Injecting "/tmp/python-66pr29p8-ansible/python" as a execv wrapper for the "/Users/ssbarnea/c/a/ansible_collections/ansible/eda/.tox/sanity/bin/python" interpreter. | |
| Run command: python -m coverage.__main__ report --rcfile /Users/ssbarnea/c/a/ansible_collections/ansible/eda/.tox/sanity/lib/python3.12/site-packages/ansi ... | |
| Name Stmts Miss Branch BrPart Cover Missing | |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | |
| .tox/sanity/lib/python3.12/site |
This file contains hidden or 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
| ssbarnea@m1: ~/c/a/ansible-dev-environment fix/de | |
| $ tox -e docs | |
| .pkg: _optional_hooks> python /Users/ssbarnea/.asdf/installs/python/3.12.1/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta | |
| .pkg: get_requires_for_build_editable> python /Users/ssbarnea/.asdf/installs/python/3.12.1/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta | |
| .pkg: build_editable> python /Users/ssbarnea/.asdf/installs/python/3.12.1/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta | |
| docs: install_package> python -I -m pip install --force-reinstall --no-deps .tox/.tmp/package/35/ansible_dev_environment-1.dev11-0.editable-py3-none-any.whl | |
| docs: commands_pre[0]> sh -c 'rm -f .coverage* coverage.xml 2>/dev/null || true' | |
| docs: commands[0]> mkdocs build | |
| docs: exit 2 (0.00 seconds) /Users/ssbarnea/c/a/ansible-dev-environment> mkdocs build | |
| .pkg: _exit> python /Users/ssbarnea/.asdf/installs/python/3.12.1/lib/python3.12/site-packages/pyproject_api/_backend.p |
This file contains hidden or 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
| $ mk pending | |
| Found molecule draft release v7.0.0 created 36 days ago: | |
| ## Major Changes | |
| - Set Python 3.10 as minimum version (#4099) @cristianonicolai | |
| ## Bugfixes |
This file contains hidden or 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
| alias dos2unix-recursive='find . -iname '*.tpl' | xargs dos2unix' | |
| alias edit='mcedit' | |
| alias del='rm' | |
| alias deltree='rm -r' | |
| alias dir='/bin/ls $LS_OPTIONS --format=vertical' | |
| alias attrib='chmod' | |
| alias chdir='cd' | |
| alias copy='cp' | |
| alias ls='ls -a' |
This file contains hidden or 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
| #!/usr/bin/env python | |
| from os.path import isfile | |
| import subprocess | |
| from email.parser import Parser | |
| from pip._internal.metadata import get_default_environment | |
| from pip._internal.utils.compatibility_tags import get_supported | |
| from pip._vendor.packaging.tags import parse_tag | |
| supported = get_supported() | |
| packages = get_default_environment().iter_installed_distributions() |
This file contains hidden or 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
| #!/usr/bin/env python | |
| import sys, os, time, platform | |
| sample_ansi = '\x1b[31mRED' + '\x1b[33mYELLOW' + '\x1b[32mGREEN' + '\x1b[35mPINK' + '\x1b[0m' + '\n' | |
| for handle in [sys.stdout, sys.stderr]: | |
| if (hasattr(handle, "isatty") and handle.isatty()) or \ | |
| ('TERM' in os.environ and os.environ['TERM']=='ANSI'): | |
| if platform.system()=='Windows' and not ('TERM' in os.environ and os.environ['TERM']=='ANSI'): |
This file contains hidden or 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
| #!/bin/bash | |
| REMHOST=$1 | |
| REMPORT=${2:-443} | |
| CACERTS=$3 | |
| KEYSTORE_PASS=changeit | |
| KEYTOOL=keytool | |
| # /etc/java-6-sun/security/cacerts |
NewerOlder