Skip to content

Instantly share code, notes, and snippets.

View markuman's full-sized avatar
🐧
Linux Only - fail fast, move on

Markus Bergholz markuman

🐧
Linux Only - fail fast, move on
  • Lekker Energie GmbH
  • Berlin
View GitHub Profile
@markuman
markuman / route53_dnssec.py
Created February 16, 2024 11:52
ansible aws route53 dnssec draft
w#!/usr/bin/python
DOCUMENTATION = '''
enable dnssec for public dns zone
'''
EXAMPLES = '''
- name: enable dnssec
route53_dnssec:

playbook

---
- hosts: localhost
  connection: local

  tasks:
    - name: facts about none-existing service
 community.aws.ecs_service_info:
TASK [ec2_vol : attach existing volume to an instance] *************************
changed: [testhost] => {"changed": true, "device": "/dev/sdg", "resource_actions": ["ec2:AttachVolume", "ec2:DeleteTags", "ec2:DescribeVolumes", "ec2:DescribeTags", "ec2:DescribeInstances"], "volume": {"attachment_set": {"attach_time": "2020-12-06T13:22:26+00:00", "deleteOnTermination": false, "device": "/dev/sdg", "instance_id": "i-0e86653037a96f76d", "status": "attaching"}, "create_time": "2020-12-06T13:18:12.123000+00:00", "encrypted": false, "id": "vol-0989fdea794998809", "iops": null, "size": 1, "snapshot_id": "", "status": "in-use", "tags": {"Name": "None"}, "type": "standard", "zone": "eu-central-1a"}, "volume_id": "vol-0989fdea794998809", "volume_type": "standard"}
TASK [ec2_vol : check task return attributes] **********************************
fatal: [testhost]: FAILED! => {
"assertion": "vol_attach_result.volume.attachment_set.status == 'attached'",
"changed": false,
"evaluated_to": false,
"msg": "Asser
@markuman
markuman / sts.yml
Last active November 24, 2020 14:01
---
- hosts: localhost
connection: local
gather_facts: False
module_defaults:
group/aws:
region: eu-central-1
vars:
>>> a = keys.select().where(keys.revoked == True)
>>> a
<peewee.ModelSelect object at 0x7f6215804f10>
>>> a.dicts()
<peewee.ModelSelect object at 0x7f62158a4fd0>
>>> a.dicts().get()
Traceback (most recent call last):
File "/home/m/.local/lib/python3.8/site-packages/peewee.py", line 6860, in get
return clone.execute(database)[0]
File "/home/m/.local/lib/python3.8/site-packages/peewee.py", line 4258, in __getitem__
renderd[145]: DEBUG: Connection 0, fd 4 closed, now 11 left
renderd[145]: DEBUG: Connection 0, fd 6 closed, now 10 left
renderd[145]: DEBUG: Connection 0, fd 7 closed, now 9 left
renderd[145]: DEBUG: Connection 0, fd 8 closed, now 8 left
renderd[145]: DEBUG: Connection 0, fd 9 closed, now 7 left
renderd[145]: DEBUG: Connection 0, fd 10 closed, now 6 left
renderd[145]: DEBUG: Connection 0, fd 11 closed, now 5 left
renderd[145]: DEBUG: Connection 0, fd 15 closed, now 4 left
renderd[145]: DEBUG: Got incoming connection, fd 4, number 5
renderd[145]: DEBUG: Got incoming request with protocol version 2
lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 40 bits physical, 48 bits virtual
CPU(s): 3
On-line CPU(s) list: 0-2
Thread(s) per core: 1
Core(s) per socket: 3
Socket(s): 1
---
- hosts: localhost
connection: local
gather_facts: False
collections:
- community.aws
- amazon.aws
vars:
{
"reqId": "wD7s77fE6ACIqQNOpwYB",
"level": 3,
"time": "2020-02-06T07:24:13+00:00",
"remoteAddr": "",
"user": "--",
"app": "PHP",
"method": "",
"url": "--",
"message": "Undefined property: OCA\\Maps\\BackgroundJob\\UpdatePhotoByFileJob::$root at /var/www/html/custom_apps/maps/lib/BackgroundJob/UpdatePhotoByFileJob.php#43",
m@EC2AMAZ-TFFLO06:~$ which python
m@EC2AMAZ-TFFLO06:~$ which python3
/usr/bin/python3
m@EC2AMAZ-TFFLO06:~$ sudo ln -s /usr/bin/python3 /usr/bin/python
[sudo] password for m:
m@EC2AMAZ-TFFLO06:~$ aws configure
-bash: /mnt/c/Users/Administrator/AppData/Local/Programs/Python/Python38/Scripts/aws: c:\users\administrator\appdata\local\programs\python\python38\python.exe^M: bad interpreter: No such file or directory