Skip to content

Instantly share code, notes, and snippets.

Avatar
🌶️
CI/CD plumber

Sorin Sbarnea ssbarnea

🌶️
CI/CD plumber
View GitHub Profile
View a.yml
#!/usr/bin/env ansible-playbook
- hosts: localhost
vars:
data:
- name: foo
when: "2 > 1"
- name: bar
tasks:
- debug:
View json-transformation.yaml
#!/usr/bin/env ansible-playbook
- hosts: localhost
gather_facts: no
tasks:
- vars:
data:
system:
df:
cmd: df -a
View README.rst
  • artcl_commands_extras - A dictionary of additional commands to be run during collection. Defined keys will override implicit ones from defaults artcl_commands which is not expected to be changed by user.

    Top level keys are used to uniqly identify a command and determine the default output filename, unless is mentioned via capture_file property.

    cmd contains the shell command that would be run.

    collect_log_type is a the category from collect_log_types list, role will run only commands from that list.

View -Users-ssbarnea-.cache-log-collected_files-centos7-var-log-extra-system.txt
=== rpms ===
GeoIP-1.5.0-14.el7.x86_64
acl-2.2.51-14.el7.x86_64
audit-libs-2.8.5-4.el7.x86_64
basesystem-10.0-7.el7.centos.noarch
bash-4.2.46-33.el7.x86_64
bind-libs-9.11.4-9.P2.el7.x86_64
bind-libs-lite-9.11.4-9.P2.el7.x86_64
bind-license-9.11.4-9.P2.el7.noarch
View gist:1921babcb6ae64bd5b428c80129afa52
git --no-optional-locks -c color.branch=false -c color.diff=false -c color.status=false -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --force ssbarnea refs/heads/fix/flake8:refs/heads/fix/flake8
Pushing to https://github.com/ssbarnea/ansible-lint
POST git-receive-pack (626 bytes)
To https://github.com/ssbarnea/ansible-lint
! [remote rejected] fix/flake8 -> fix/flake8 (refusing to allow an integration to create or update .github/workflows/tox-linters.yml)
error: failed to push some refs to 'https://github.com/ssbarnea/ansible-lint'
Completed with errors, see above
View -var-folders-3q-pc1jcyjj3qqbj6_x7n4kbtqw0000gn-T-python-build.20191010161927.78632.log
This file has been truncated, but you can view the full file.
/var/folders/3q/pc1jcyjj3qqbj6_x7n4kbtqw0000gn/T/python-build.20191016194728.27169 ~/os/pytest-molecule
/var/folders/3q/pc1jcyjj3qqbj6_x7n4kbtqw0000gn/T/python-build.20191016194728.27169/Python-3.6.9
/var/folders/3q/pc1jcyjj3qqbj6_x7n4kbtqw0000gn/T/python-build.20191016194728.27169/Python-3.6.9 /var/folders/3q/pc1jcyjj3qqbj6_x7n4kbtqw0000gn/T/python-build.20191016194728.27169 ~/os/pytest-molecule
checking build system type... x86_64-apple-darwin19.0.0
checking host system type... x86_64-apple-darwin19.0.0
checking for python3.6... no
checking for python3... python3
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
View stdin.yml
#!/usr/bin/env ansible-playbook
- hosts: localhost
tasks:
- command:
md5
args:
stdin: secret
register: result
- debug: var=result
View gist:526c2c453d2714e659a9e1f6de1fbf56
failed: [ubuntu] (item={'diff': [], 'dest': '/root/src/pytest_molecule-1.1.1.dev6+g249a96a-py2.py3-none-any.whl', 'src': '/root/.ansible/tmp/ansible-tmp-1567880285.908344-123219952296567/source', 'md5sum': '5eeb9ff537d51db9c4a6c88fd7c8230f', 'checksum': 'fff3542f35e4622dd0159d511ffc3dcc6713ea7a', 'changed': True, 'uid': 0, 'gid': 0, 'owner': 'root', 'group': 'root', 'mode': '0644', 'state': 'file', 'size': 6923, 'invocation': {'module_args': {'src': '/root/.ansible/tmp/ansible-tmp-1567880285.908344-123219952296567/source', 'dest': '/root/src/pytest_molecule-1.1.1.dev6+g249a96a-py2.py3-none-any.whl', '_original_basename': 'pytest_molecule-1.1.1.dev6+g249a96a-py2.py3-none-any.whl', 'follow': False, 'checksum': 'fff3542f35e4622dd0159d511ffc3dcc6713ea7a', 'backup': False, 'force': True, 'content': None, 'validate': None, 'directory_mode': None, 'remote_src': None, 'local_follow': None, 'mode': None, 'owner': None, 'group': None, 'seuser': None, 'serole': None, 'selevel': None, 'setype': None, 'attributes': No
View some.yml
- when: ansible_python is not defined
setup:
gather_subset: min
- debug:
msg: "{{ ansible_python.executable }}"
View .-test-py-futures-wait.py
#!/usr/bin/env python
from __future__ import print_function
# for python2.7 do `pip install futures`
from concurrent import futures
import sys
from time import sleep
from random import randint
def worker(i):
You can’t perform that action at this time.