# pwsh
PowerShell 6.2.1
Copyright (c) Microsoft Corporation. All rights reserved.
https://aka.ms/pscore6-docs
Type 'help' to get help.
PS /root/mnt> class A {
>>
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
#!/usr/bin/env python3 | |
import string | |
import itertools | |
import hashlib | |
import json | |
from multiprocessing import Pool, Manager | |
U = string.ascii_uppercase # ['A', 'B', ..., 'Z'] | |
L = string.ascii_lowercase # ['a', 'b', ..., 'z'] |
[root@ceph01 /]# radosgw-admin --cluster ceph-a zonegroup get
{
"id": "47e7433a-bfe2-4c6a-b761-4cdf32cbf25c",
"name": "zg-1",
"api_name": "zg-1",
"is_master": "true",
"endpoints": [
"http://s3.virt.priv:8080"
],
I have this:
A - B - C - F - G (master)
\
D - E (BranchB, origin/BranchB)
I want to have this:
I'm on Ubuntu 18.04. According to the pastes below:
- mac address of
eno1
0c:c4:7a:c6:ae:26 - mac address of
eno2
0c:c4:7a:c6:ae:27 - mac address of
bond1
(bondig ofeno1
andeno2
) 92:da:30:66:27:50
Why 92:da:30:66:27:50 for bond1? No relation with the mac address of eno1
and eno2
.
zstore-2.dc2.backbone.education changes in mounted filesystems:
1d0
< 192.168.19.20:/zstore/nunkis /root/mnt-zstore1-nunkis nfs rw 0 0
zstore-2.dc2.backbone.education kernel log messages:
> CPU: AMD Opteron(tm) Processor 6128 (2000.06-MHz K8-class CPU)
> SMP: AP CPU #7 Launched!
> SMP: AP CPU #4 Launched!
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
# lsof -u www-data | grep -v '/usr/lib/' | grep -v '/lib/x86' | grep svt | |
php-fpm7. 4525 www-data 5r REG 0,40 1288 1610902823 /web/web/shared/sites/svt.ac-versailles.fr/tmp/cache/aa/3e.cache (tete-nas-vl105-smb-vip.in.ac-versailles.fr:/spip-mutu-discip) | |
php-fpm7. 4526 www-data 6r REG 0,40 1288 1610902823 /web/web/shared/sites/svt.ac-versailles.fr/tmp/cache/aa/3e.cache (tete-nas-vl105-smb-vip.in.ac-versailles.fr:/spip-mutu-discip) | |
php-fpm7. 4528 www-data 6r REG 0,40 1288 1610902823 /web/web/shared/sites/svt.ac-versailles.fr/tmp/cache/aa/3e.cache (tete-nas-vl105-smb-vip.in.ac-versailles.fr:/spip-mutu-discip) | |
php-fpm7. 4529 www-data 5r REG 0,40 1288 1610902823 /web/web/shared/sites/svt.ac-versailles.fr/tmp/cache/aa/3e.cache (tete-nas-vl105-smb-vip.in.ac-versailles.fr:/spip-mutu-discip) | |
php-fpm7. 4535 www-data 5r REG 0,40 1288 1610902823 /web/web/shared/sites/svt.ac-versaille |
Is there a ad hoc idiomatic syntax to do that in Ansible, ie manage the content of a file if a variable is defined or remove the file if the same variable is not defined?
Or maybe this is the good way to do that?
- name: manage the content of /tmp/foo.txt
template:
src: foo.txt.j2
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/sh | |
URL='http://localhost:4440' | |
login='admin' | |
password='password...' | |
curl --cookie-jar ~/mycookie --data "j_username=$login" --data "j_password=$password" "$URL/j_security_check" | |
projects=$(curl --silent --cookie ~/mycookie "$URL/api/1/projects" | sed -nr 's|<name>(.*)</name>|\1|p') |