OK, mamy super tajny plik z hasłami, który trzeba zaszyfrować:
$ cat test.yml
foo: bar
Generujemy hasło (w dobrym tonie może być dodać plik z hasłem do .gitignore) i szyfrujemy:
$ pwgen 20 1 > vault.passwd
#![feature(libc)] | |
#![feature(std_misc)] | |
extern crate libc; | |
use std::ffi::CString; | |
fn main() { | |
let s0 = "/bin/echo".as_bytes(); | |
let s1 = "Hello world".as_bytes(); | |
let argv0 = CString::from_slice(s0); |
from ansible import playbook, callbacks | |
import logging | |
import pprint | |
class LoggingCallbacks(callbacks.PlaybookCallbacks): | |
def log(self, level, msg, *args, **kwargs): | |
logging.log(level, msg, *args, **kwargs) | |
def on_task_start(self, name, is_conditional): |
MAPPING = { | |
'_default_': { | |
'_all': {'enabled': False}, | |
'dynamic_templates': [ | |
{ | |
'analyzed_body': { | |
'match': 'body', | |
'match_mapping_type': 'string', | |
'mapping': { | |
'type': 'string', |
#!/usr/bin/env python | |
from ansible.inventory import Inventory | |
import os | |
import sys | |
def get_addr(hostname): | |
inv = Inventory() | |
host = inv.get_host(hostname) | |
if not host: |
from ansible import playbook, callbacks | |
def run_playbook(path, extra_vars): | |
stats = callbacks.AggregateStats() | |
playbook_cb = callbacks.PlaybookCallbacks(verbose=1) | |
runner_cb = callbacks.PlaybookRunnerCallbacks(stats, verbose=1) | |
pb = playbook.PlayBook( | |
playbook=path, |
>>VVVVVVV+^+^+^+^+^+>v+>v+>v+>^+>^+>^+V+V+V+V+V+ | |
<<+<+<+<+^+^+^+>+>+<<^+^+>+>+>+> | |
<+<+<+<+V+V+V+V+V+>+>+>+>+^+^+<+ | |
<<VV+^+^+^+^+^+ | |
<<+>+>+>+>+<<+V+V+V+V+V+ | |
>>>>><<+<+<+<+^+^+^+>+>+<<^+^+>+>+>+ | |
VVVVV+^+^+^+^+^+<+<+<+V+V+V+V+V+^^^>+>+ | |
<<<<VVV+^+^+^+^+^+>v+>v+>v+>^+>^+>^+V+V+V+V+V+ | |
infinite{.} |
++<=++<=+<=++<=++<=+<=++<=++<=+<=++^^= | |
++<=++<=+<=++<=++<=+<=++<=++<=+<=++^= | |
<=++<=++<=++<=++<=++<=++<=++<=++<=++<=++^^ | |
<=++<=++<=++<=++<=++<=++<=++<=++<=++^ | |
++<=++<=+<=++<=++<=+<=++<=++<=+<=++^^= | |
++<=++<=+<=++<=++<=+<=++<=++<=+<=++^= | |
<=++<=++<=++<=++<=++<=++<=++<=++<=++<=++^^ | |
<=++<=++<=++<=++<=++<=++<=++<=++<=++^ | |
--- | |
- hosts: $host | |
tasks: | |
- environment: | |
- debug: msg="{{ env_HOME }}" | |
- debug: msg="{{ environment.HOME }}" | |
- debug: msg="{{ environment }}" |
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Dpkg::Version; | |
use Getopt::Long; | |
my $head; | |
my $reverse; |