This file contains 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 | |
umask 077 | |
if [ "$1" == "" ] | |
then | |
echo "Usage: pg_connect SSH_HOST psql_options" | |
fi | |
ssh_host=$1 | |
shift |
This file contains 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
The full traceback is: | |
File "/tmp/ansible_apt_repository_payload_jj6wzfp1/ansible_apt_repository_payload.zip/ansible/modules/packaging/os/apt_repository.py", line 548, in main | |
File "/usr/lib/python3/dist-packages/apt/cache.py", line 562, in update | |
raise FetchFailedException(e) | |
fatal: [vger]: FAILED! => { | |
"changed": false, | |
"invocation": { | |
"module_args": { | |
"codename": null, |
This file contains 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
MariaDB [test]> create table t1 (id int unsigned not null auto_increment primary key); | |
Query OK, 0 rows affected (0.027 sec) | |
MariaDB [test]> create table t2 (id int unsigned not null auto_increment primary key, t1_id int unsigned not null, foreign key(t1_id) references t1(id)); | |
Query OK, 0 rows affected (0.040 sec) | |
MariaDB [test]> insert into t2 (t1_id) values (1); | |
ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`t1_id`) REFERENCES `t1` (`id`)) | |
MariaDB [test]> set foreign_key_checks=0; | |
Query OK, 0 rows affected (0.000 sec) |
This file contains 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
"source_ami_filter": { | |
"filters": { | |
"virtualization-type": "hvm", | |
"name": "CentOS Linux 7 x86_64 HVM EBS ENA 1901*", | |
"root-device-type": "ebs" | |
}, | |
"owners": [ | |
"679593333241" | |
], | |
"most_recent": true |
This file contains 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
root@ip-172-18-21-22:~# dd if=/dev/zero of=myxfs bs=1 count=0 seek=2G | |
0+0 records in | |
0+0 records out | |
0 bytes copied, 0.000199112 s, 0.0 kB/s | |
root@ip-172-18-21-22:~# mkfs.xfs myxfs | |
meta-data=myxfs isize=512 agcount=4, agsize=131072 blks | |
= sectsz=512 attr=2, projid32bit=1 | |
= crc=1 finobt=1, sparse=0, rmapbt=0, reflink=0 | |
data = bsize=4096 blocks=524288, imaxpct=25 | |
= sunit=0 swidth=0 blks |
This file contains 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
----------52.48.95.74-------- | |
total 0 | |
lrwxrwxrwx 1 root root 13 May 10 16:25 nvme-Amazon_Elastic_Block_Store_vol01f9d4a5c1497535d -> ../../nvme0n1 | |
lrwxrwxrwx 1 root root 13 May 10 16:25 nvme-Amazon_Elastic_Block_Store_vol0c83712f171fc4151 -> ../../nvme1n1 | |
lrwxrwxrwx 1 root root 15 May 10 16:25 nvme-Amazon_Elastic_Block_Store_vol0c83712f171fc4151-part1 -> ../../nvme1n1p1 | |
lrwxrwxrwx 1 root root 13 May 10 16:25 nvme-nvme.1d0f-766f6c3031663964346135633134393735333564-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001 -> ../../nvme0n1 | |
lrwxrwxrwx 1 root root 13 May 10 16:25 nvme-nvme.1d0f-766f6c3063383337313266313731666334313531-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001 -> ../../nvme1n1 | |
lrwxrwxrwx 1 root root 15 May 10 16:25 nvme-nvme.1d0f-766f6c3063383337313266313731666334313531-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001-part1 -> ../../nvme1n1p1 | |
----------34.254.163.177-------- | |
total 0 |
This file contains 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
#cloud-config | |
fs_setup: | |
- label: docker | |
device: /dev/nvme0n1 | |
filesystem: xfs | |
partition: none | |
overwrite: false | |
extra_opts: ['-n', 'ftype=1', '-l', 'size=256m', '-b', 'size=4096', | |
'-s', 'size=4096', '-m', 'crc=1,finobt=1,rmapbt=1,reflink=1', | |
'-i', 'sparse=1'] |
This file contains 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
- name: check metadata endpoint | |
uri: | |
url: http://169.254.169.254/latest/meta-data/ | |
timeout: 1 | |
return_content: yes | |
register: _nmiac_metadata | |
changed_when: no | |
check_mode: no | |
failed_when: no |
This file contains 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
volumes: | |
docker: | |
type: xfs | |
mount: /srv/docker | |
mount_options : defaults | |
mkfs_options: -s size=4096 -b size=4096 -m crc=1,finobt=1,rmapbt=1,reflink=1 -l size=128m -i sparse=1 | |
devices: | |
- 'volume:docker-enc' | |
docker-enc: | |
type: luks2 |
This file contains 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
ssh-add -t 300 $ca_private_key_file # key will be available in agent for 5m | |
ssh-keygen -s $ca_private_key_file -U -I $host_identity_sring -n $hostname -h -V +52w $public_host_key |
NewerOlder