Skip to content

Instantly share code, notes, and snippets.

Chrrrles Paul chrrrles

  • Hong Kong
Block or report user

Report or block chrrrles

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View add_host_test.yml
---
- hosts: all
tasks:
- add_host:
name: 10.10.22.22
groups: test_group
- command: echo 'this command will not connect to 10.10.22.22'
- hosts: all
tasks:
@chrrrles
chrrrles / jinja equalto test
Created Feb 1, 2017
How to use jinja select and filter in ansible
View jinja equalto test
# test.yml
---
- hosts: localhost
connection: local
gather_facts: no
vars:
my_list:
- one
- two
- three
View atomic rpm-ostree-toolbox fail at imagefactory
[root@a830ca3bdcaa working]# rpm-ostree-toolbox imagefactory -c fedora-atomic/config.ini -i kvm -i raw --ostreerepo /srv/rpm-ostree/fedora-atomic/23/ -o /srv/rpm-ostree/fedora-atomic/23/images
/usr/lib64/rpm-ostree-toolbox/py/rpmostreecompose/imagefactory.py:29: PyGIWarning: OSTree was imported without specifying a version first. Use gi.require_version('OSTree', '1.0') before import to ensure that the right version gets loaded.
from gi.repository import Gio, OSTree, GLib # pylint: disable=no-name-in-module
/usr/lib64/rpm-ostree-toolbox/py/rpmostreecompose/taskrunner.py:27: PyGIWarning: GSystem was imported without specifying a version first. Use gi.require_version('GSystem', '1.0') before import to ensure that the right version gets loaded.
from gi.repository import GLib,Gio,GSystem # pylint: disable=no-name-in-module
No kickstart was passed with -k and /home/working/fedora-atomic/fedora-atomic-f23.ks does not exist
View lvol-size-value-playbook.yaml
---
- name: test float values with lvol
sudo: yes
remote_user: user
hosts: all
vars:
img: /tmp/lvol_test.img
tasks:
- name: create loop image
shell: dd if=/dev/zero of={{ img }} bs=1M count=100
View preambler.py
preamble = """# Copyright (c) 2013 - The C3PX authors.
#
# This file is part of C3PX.
#
# C3PX is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# C3PX is distributed in the hope that it will be useful,
View yamlize_iso-3166-1-alpha-2.py
# -*- encoding: utf-8 -*-
import string
import yaml
from yaml import Loader, SafeLoader
# From Cryo http://stackoverflow.com/a/2967461
def construct_yaml_str(self, node):
return self.construct_scalar(node)
You can’t perform that action at this time.