Skip to content

Instantly share code, notes, and snippets.

View metabsd's full-sized avatar
🏠
Working from home

Benoit Martin metabsd

🏠
Working from home
View GitHub Profile
apiVersion: crunchydata.com/v1
kind: Pgcluster
metadata:
annotations:
current-primary: ${pgo_cluster_name}
labels:
autofail: "true"
crunchy-pgbadger: "false"
crunchy-pgha-scope: ${pgo_cluster_name}
crunchy-postgres-exporter: "false"
def get_ip(tor):
try:
return str(ip_interface(tor["primary_ip"]["address"]).ip)
except Exception:
return "NO_IP"
tors_list = [
{
"name": tor["name"],
---
- name: My playbook
connection: local
hosts: localhost
gather_facts: False
vars:
environment:
no_proxy: "{{ no_proxy_vars }}"
tasks:
- name: My task
ERROR: Found 2 pylint issue(s) which need to be resolved:
ERROR: plugins/modules/my_module.py:239:25: unnecessary-lambda: Lambda may not be necessary
ERROR: tests/sanity/ignore-2.9.txt:1:1: ansible-test: Ignoring 'W0108' on 'plugins/modules/my_module.py' is unnecessary
ignore-2.9.txt
plugins/modules/my_module.py pylint:W0108
The line in question
portSets is a list
"projects": ["iaas_infra_services", "test1", "test2", "QuarantineGroup"]
- name: DEBUG PROJECT TAGS
debug:
var: item
with_items: "{{ projects }}"
when: item != "iaas_infra_services" or item != "QuarantineGroup"
- name: 2 - test two
include_role:
name: my_role
ignore_errors: yes
vars:
variable1: test
register: test_two
- name: 2 - ASSERT
assert:
ROLE6
+
|
|
|
|
|
|
v
ROLE5
GOOD ONE
--------
1433
80,443
22,24:26,8080,22,24:26,8080,80:81
22,24:26,8080
65535
123:65535
BAD ONE
source_project,source_sectag,source_network,destination_project,destination_sectag,destination_network,protocol,port
project1,worker_prod_ssz,N/A,N/A,N/A,net_10.2.127.64-26,TCP,12000:14000
project1,worker_prod_ssz,N/A,N/A,N/A,net_10.2.127.64-26,TCP,9091
project1,worker_prod_ssz,N/A,N/A,N/A,net_10.2.127.128-26,TCP,"9092,2181,9093,27017:27027"
urlparse()
ParseResult(scheme='https', netloc='localhost:4343', path='/services/v1/org/ee6202f2-a3be-44c5-b4bb-a7c251e92b1e/inlg', params='', query='&p=0&s=1&q=___displayName%25%22bbm_crmmap_ntz%22', fragment='')
Faire la connection https et tentative de faire un GET mais j'ai un query string.
conn = httplib.HTTPSConnection(
url_info.netloc, context=context, timeout=10,
)
conn.request("GET", url_info.path + url_info.query, headers=headers)
response = conn.getresponse()