Skip to content

Instantly share code, notes, and snippets.

Felix Frank ffrank

Block or report user

Report or block ffrank

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View equivalent.mcl
mount "/mnt/acceptance_mount" {
state => "exists",
device => "/tmp/loopdevice",
type => "ext2",
options => {
"rw"=>"",
"loop"=>"",
},
}
View mount run
demo@dev-app01-ffrank:~/go/src/github.com/purpleidea/mgmt$ sudo mgmt run --tmp-prefix --converged-timeout 5 yaml --yaml mount_test_simple.yml
This is: mgmt, version: 0.0.18-50-gc694fde-dirty
Copyright (C) 2013-2019+ James Shubin and the project contributors
Written by James Shubin <james@shubin.ca> and the project contributors
01:07:55 hello.go:53: main: start: 1558998475568555256
01:07:55 main.go:191: main: warning: working prefix directory is temporary!
01:07:55 main.go:191: main: working prefix is: /tmp/mgmt-dev-app01-ffrank-044599394
01:07:56 pgp.go:89: PGP: Created key: BA88AEBA
01:07:56 main.go:191: main: etcd: seeds: no seeds specified!
01:07:56 etcd.go:446: Etcd: Bootstrapping...
View stats
389 native translations
320 failed translations
226 unsupported resources
226x User[...] the managehome parameter is not supported
226x User[...] cannot be translated natively, falling back to 'exec puppet resource'
208x Ssh_authorized_key[...] cannot be translated natively, falling back to 'exec puppet resource'
78x User[...] cannot translate attribute 'shell', failing resource translation
78x User[...] cannot translate attribute 'groups', failing resource translation
41x Exec[...] cannot translate attribute 'path', failing resource translation
41x Exec[...] cannot be translated natively, falling back to 'exec puppet resource'
View first mgmt process
$ ./mgmt run --client-urls http://86.231.179.14:2379 --server-urls http://86.231.179.14:2380 --advertise-client-urls http://86.231.179.14:2379 --advertise-server-urls http://86.231.179.14:2380 --hostname h1 --ideal-cluster-size 1 --tmp-prefix --no-pgp lang --lang examples/lang/exchange0.mcl
2019-03-23 21:00:07.434141 I | cli: lang: lexing/parsing...
2019-03-23 21:00:07.443839 I | cli: lang: init...
2019-03-23 21:00:07.443925 I | cli: lang: interpolating...
2019-03-23 21:00:07.444012 I | cli: lang: building scope...
2019-03-23 21:00:07.444084 I | cli: lang: running type unification...
2019-03-23 21:00:07.444518 I | cli: lang: input: examples/lang/exchange0.mcl
2019-03-23 21:00:07.444566 I | cli: lang: tree:
.
├── exchange0.mcl
@ffrank
ffrank / console
Created Dec 12, 2018
go generate warnings from stringer
View console
~/go/src/github.com/purpleidea/mgmt$ go generate ./...
stringer: checking package: augeas.go:27:2: could not import github.com/purpleidea/mgmt/engine (reading export data: /home/demo/go/pkg/linux_amd64/github.com/purpleidea/mgmt/engine.a: invalid encoding format in export data: got 'v'; want 'c' or 'd')
engine/resources/aws_ec2.go:110: running "stringer": exit status 1
stringer: checking package: type.go:25:11: could not import github.com/hashicorp/go-multierror (reading export data: /home/demo/go/pkg/linux_amd64/github.com/hashicorp/go-multierror.a: invalid encoding format in export data: got 'v'; want 'c' or 'd')
lang/types/type.go:37: running "stringer": exit status 1
View gem_make.out
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:1:in `<main>'
View os_floating_ip_weirdness.json
ok: [localhost] => {
"changed": false,
"floating_ip": {
"attached": true,
"fixed_ip_address": "192.168.1.18",
"floating_ip_address": "10.96.214.57",
"floating_network_id": "c44fdb62-8071-44b7-8e9e-c470ba8e30d4",
"id": "54c20d20-8193-414b-835e-ff483449ee98",
"network": "c44fdb62-8071-44b7-8e9e-c470ba8e30d4",
"port_id": "8aad20ab-c7ac-4a45-8916-9c742d3d3784",
@ffrank
ffrank / .vimrc
Created Dec 28, 2016
vim settings for readable diffing and spell checks
View .vimrc
highlight DiffAdd term=reverse cterm=bold ctermbg=green ctermfg=white
highlight DiffChange term=reverse cterm=bold ctermbg=cyan ctermfg=black
highlight DiffText term=reverse cterm=bold ctermbg=gray ctermfg=black
highlight DiffDelete term=reverse cterm=bold ctermbg=red ctermfg=black
highlight SpellBad term=reverse cterm=bold ctermbg=red ctermfg=white
highlight SpellCap term=reverse cterm=bold ctermbg=cyan ctermfg=black
highlight SpellRare term=reverse cterm=bold ctermbg=gray ctermfg=black
View template.erb
# I am managed in <%= @__scope__.source.namespace %> line <%= @__scope__.source.line %>
actual
contents
...
@ffrank
ffrank / graph-template.yaml
Created May 30, 2016
mgmt tempfile weirdness
View graph-template.yaml
# /tmp/mgmt/testgraph-from-puppet
---
graph: fflaptop.local
comment: generated from puppet catalog for fflaptop.local
resources:
file:
- name: "/tmp/__FILE__"
path: "/tmp/__FILE__"
state: exists
content: accepted
You can’t perform that action at this time.