foreman_ansible 0.1.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of foreman_ansible might be problematic. Click here for more details.

data/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # Foreman Ansible :arrow_forward:
2
+
3
+ [Foreman](http://theforeman.org) integration with Ansible. For now, it's just importing facts and not meant for general use.
4
+
5
+ ** Warning - this project hasn't been released yet, and might change significantly. Please don't use in production. **
6
+
7
+ ## Basic usage
8
+
9
+ Deploy `extras/foreman_callback.py` as a callback on your Ansible installation. For instance, put in your `ansible.cfg`:
10
+
11
+ ```
12
+ callback_plugins = ~/.ansible/plugins/callback_plugins/
13
+ bin_ansible_callbacks = True
14
+ ```
15
+
16
+ And copy `extras/foreman_callback.py` from this repo to `~/.ansible/plugins/callback_plugins/`. That's it!
17
+
18
+ Now, every time you run `ansible -m setup $HOSTNAME`, Ansible will automatically submit facts for $HOSTNAME to Foreman.
19
+
20
+ In Foreman, you should add whatever Ansible hosts you want to submit facts from to the Setting (Administer > Settings, Puppet tab - I know..)) 'trusted_puppetmaster_hosts'.
21
+
22
+ #### Demo
23
+
24
+ ![demo gif](http://i.imgur.com/mlnVFJj.gif)
25
+
26
+ ### Extra
27
+
28
+ If the Foreman setting 'create_new_host_when_facts_are_uploaded' is true, and $HOSTNAME doesn't exist in Foreman, it will autocreate that host in Foreman. If it already exists, it will update the facts.
29
+
30
+ Similarly, the Foreman setting 'ignore_puppet_facts_for_provisioning' is set to false, facts related to interfaces will update the interfaces of $HOSTNAME in Foreman.
31
+
32
+ ### Devs
33
+
34
+ Send a POST request to /api/v2/hosts/facts with the format you can see [in the API docs](http://theforeman.org/api/1.9/apidoc/v2/hosts/facts.html).
35
+
36
+ Facts must contain the output of `ansible -m setup $HOSTNAME`, plus a '_type' and '_timestamp' top level keys. You can see an example on test/fixtures/sample_facts.json in this repository.
37
+
38
+ After that request, you should have a host registered in Foreman with the Ansible facts. It takes into account some facter and ohai facts if these are available on the system as well.
39
+
40
+ ## Contributing
41
+
42
+ Fork and send a Pull Request. Thanks!
43
+
44
+ ## Copyright
45
+
46
+ Copyright (c) Daniel Lobato Garcia
47
+
48
+ This program is free software: you can redistribute it and/or modify
49
+ it under the terms of the GNU General Public License as published by
50
+ the Free Software Foundation, either version 3 of the License, or
51
+ (at your option) any later version.
52
+
53
+ This program is distributed in the hope that it will be useful,
54
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
55
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
56
+ GNU General Public License for more details.
57
+
58
+ You should have received a copy of the GNU General Public License
59
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
data/Rakefile ADDED
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env rake
2
+ begin
3
+ require 'bundler/setup'
4
+ rescue LoadError
5
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6
+ end
7
+ begin
8
+ require 'rdoc/task'
9
+ rescue LoadError
10
+ require 'rdoc/rdoc'
11
+ require 'rake/rdoctask'
12
+ RDoc::Task = Rake::RDocTask
13
+ end
14
+
15
+ RDoc::Task.new(:rdoc) do |rdoc|
16
+ rdoc.rdoc_dir = 'rdoc'
17
+ rdoc.title = 'ForemanAnsible'
18
+ rdoc.options << '--line-numbers'
19
+ rdoc.rdoc_files.include('README.rdoc')
20
+ rdoc.rdoc_files.include('lib/**/*.rb')
21
+ end
22
+
23
+ APP_RAKEFILE = File.expand_path('../test/dummy/Rakefile', __FILE__)
24
+
25
+ Bundler::GemHelper.install_tasks
26
+
27
+ require 'rake/testtask'
28
+
29
+ Rake::TestTask.new(:test) do |t|
30
+ t.libs << 'lib'
31
+ t.libs << 'test'
32
+ t.pattern = 'test/**/*_test.rb'
33
+ t.verbose = false
34
+ end
35
+
36
+ task :default => :test
37
+
38
+ begin
39
+ require 'rubocop/rake_task'
40
+ RuboCop::RakeTask.new
41
+ rescue => _
42
+ puts 'Rubocop not loaded.'
43
+ end
44
+
45
+ task :default do
46
+ Rake::Task['rubocop'].execute
47
+ end
@@ -0,0 +1,3 @@
1
+ module ForemanAnsible
2
+ class FactName < ::FactName; end
3
+ end
@@ -0,0 +1,13 @@
1
+ module ForemanAnsible
2
+ class FactImporter < ::FactImporter
3
+ def fact_name_class
4
+ ForemanAnsible::FactName
5
+ end
6
+
7
+ def initialize(host, facts = {})
8
+ @host = host
9
+ @facts = normalize(facts[:ansible_facts])
10
+ @counters = {}
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,89 @@
1
+ module ForemanAnsible
2
+ class FactParser < ::FactParser
3
+ attr_reader :facts
4
+
5
+ def initialize(facts)
6
+ @facts = HashWithIndifferentAccess.new(facts[:ansible_facts])
7
+ end
8
+
9
+ def operatingsystem
10
+ args = { :name => os_name, :major => os_major, :minor => os_minor }
11
+ Operatingsystem.where(args).first ||
12
+ Operatingsystem.create!(args.merge(:description => os_description))
13
+ end
14
+
15
+ def environment
16
+ # Don't do anything
17
+ end
18
+
19
+ def architecture
20
+ name = facts[:ansible_architecture] || facts[:facter_architecture]
21
+ Architecture.where(:name => name).first_or_create unless name.blank?
22
+ end
23
+
24
+ def model
25
+ name ||= facts[:ansible_product_name] ||
26
+ facts[:facter_virtual] ||
27
+ facts[:facter_productname] ||
28
+ facts[:facter_model]
29
+ Model.where(:name => name.strip).first_or_create unless name.blank?
30
+ end
31
+
32
+ def domain
33
+ name = facts[:ansible_domain] ||
34
+ facts[:facter_domain] ||
35
+ facts[:ohai_domain]
36
+ Domain.where(:name => name).first_or_create unless name.blank?
37
+ end
38
+
39
+ def support_interfaces_parsing?
40
+ true
41
+ end
42
+
43
+ def get_interfaces
44
+ facts[:ansible_interfaces]
45
+ end
46
+
47
+ def get_facts_for_interface(interface)
48
+ interface.gsub!(/-/, '_') # virbr1-nic -> virbr1_nic
49
+ interface_facts = facts[:"ansible_#{interface}"]
50
+ ipaddress = ip_from_interface(interface)
51
+ HashWithIndifferentAccess[interface_facts.merge(:ipaddress => ipaddress)]
52
+ end
53
+
54
+ def ipmi_interface
55
+ # ?
56
+ end
57
+
58
+ private
59
+
60
+ def ip_from_interface(interface)
61
+ return unless facts[:"ansible_#{interface}"]['ipv4'].present?
62
+ facts[:"ansible_#{interface}"]['ipv4']['address']
63
+ end
64
+
65
+ def os_name
66
+ facts[:ansible_distribution] ||
67
+ facts[:ansible_lsb]['id']
68
+ end
69
+
70
+ def os_major
71
+ facts[:ansible_distribution_major_version] ||
72
+ facts[:ansible_lsb]['major_release']
73
+ end
74
+
75
+ def os_release
76
+ facts[:ansible_distribution_version] ||
77
+ facts[:ansible_lsb]['release']
78
+ end
79
+
80
+ def os_minor
81
+ _, minor = os_release.split('.')
82
+ minor || ''
83
+ end
84
+
85
+ def os_description
86
+ facts[:ansible_lsb]['description']
87
+ end
88
+ end
89
+ end
@@ -0,0 +1,4 @@
1
+ require 'foreman_ansible/engine'
2
+
3
+ module ForemanAnsible
4
+ end
@@ -0,0 +1,26 @@
1
+ require 'deface'
2
+
3
+ module ForemanAnsible
4
+ class Engine < ::Rails::Engine
5
+ engine_name 'foreman_ansible'
6
+
7
+ config.autoload_paths += Dir["#{config.root}/app/overrides"]
8
+ config.autoload_paths += Dir["#{config.root}/app/services"]
9
+
10
+ initializer 'foreman_ansible.register_plugin', :after => :finisher_hook do
11
+ Foreman::Plugin.register :foreman_ansible do
12
+ requires_foreman '>= 1.6'
13
+ end
14
+ end
15
+
16
+ config.to_prepare do
17
+ begin
18
+ ::FactImporter.register_fact_importer(:ansible,
19
+ ForemanAnsible::FactImporter)
20
+ ::FactParser.register_fact_parser(:ansible, ForemanAnsible::FactParser)
21
+ rescue => e
22
+ Rails.logger "Foreman Ansible: skipping engine hook (#{e})"
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,3 @@
1
+ module ForemanAnsible
2
+ VERSION = '0.1.0'
3
+ end
@@ -0,0 +1,49 @@
1
+ # Tasks
2
+ namespace :foreman_ansible do
3
+ namespace :example do
4
+ desc 'Example Task'
5
+ task :task => :environment do
6
+ # Task goes here
7
+ end
8
+ end
9
+ end
10
+
11
+ # Tests
12
+ namespace :test do
13
+ desc 'Test ForemanAnsible'
14
+ Rake::TestTask.new(:foreman_ansible) do |t|
15
+ test_dir = File.join(File.dirname(__FILE__), '../..', 'test')
16
+ t.libs << ['test', test_dir]
17
+ t.pattern = "#{test_dir}/**/*_test.rb"
18
+ t.verbose = true
19
+ end
20
+ end
21
+
22
+ namespace :foreman_ansible do
23
+ task :rubocop do
24
+ begin
25
+ require 'rubocop/rake_task'
26
+ RuboCop::RakeTask.new(:rubocop_foreman_ansible) do |task|
27
+ task.patterns = ["#{ForemanAnsible::Engine.root}/app/**/*.rb",
28
+ "#{ForemanAnsible::Engine.root}/lib/**/*.rb",
29
+ "#{ForemanAnsible::Engine.root}/test/**/*.rb"]
30
+ end
31
+ rescue
32
+ puts 'Rubocop not loaded.'
33
+ end
34
+
35
+ Rake::Task['rubocop_foreman_ansible'].invoke
36
+ end
37
+ end
38
+
39
+ Rake::Task[:test].enhance do
40
+ Rake::Task['test:foreman_ansible'].invoke
41
+ end
42
+
43
+ load 'tasks/jenkins.rake'
44
+ if Rake::Task.task_defined?(:'jenkins:unit')
45
+ Rake::Task['jenkins:unit'].enhance do
46
+ Rake::Task['test:foreman_ansible'].invoke
47
+ Rake::Task['foreman_ansible:rubocop'].invoke
48
+ end
49
+ end
data/locale/Makefile ADDED
@@ -0,0 +1,62 @@
1
+ #
2
+ # Makefile for PO merging and MO generation. More info in the README.
3
+ #
4
+ # make all-mo (default) - generate MO files
5
+ # make check - check translations using translate-tool
6
+ # make tx-update - download and merge translations from Transifex
7
+ # make clean - clean everything
8
+ #
9
+ DOMAIN = foreman_ansible
10
+ VERSION = $(shell ruby -e 'require "rubygems";spec = Gem::Specification::load(Dir.glob("../*.gemspec")[0]);puts spec.version')
11
+ POTFILE = $(DOMAIN).pot
12
+ MOFILE = $(DOMAIN).mo
13
+ POFILES = $(shell find . -name '*.po')
14
+ MOFILES = $(patsubst %.po,%.mo,$(POFILES))
15
+ POXFILES = $(patsubst %.po,%.pox,$(POFILES))
16
+
17
+ %.mo: %.po
18
+ mkdir -p $(shell dirname $@)/LC_MESSAGES
19
+ msgfmt -o $(shell dirname $@)/LC_MESSAGES/$(MOFILE) $<
20
+
21
+ # Generate MO files from PO files
22
+ all-mo: $(MOFILES)
23
+
24
+ # Check for malformed strings
25
+ %.pox: %.po
26
+ msgfmt -c $<
27
+ pofilter --nofuzzy -t variables -t blank -t urls -t emails -t long -t newlines \
28
+ -t endwhitespace -t endpunc -t puncspacing -t options -t printf -t validchars --gnome $< > $@
29
+ cat $@
30
+ ! grep -q msgid $@
31
+
32
+ check: $(POXFILES)
33
+ msgfmt -c ${POTFILE}
34
+
35
+ # Merge PO files
36
+ update-po:
37
+ for f in $(shell find ./ -name "*.po") ; do \
38
+ msgmerge -N --backup=none -U $$f ${POTFILE} ; \
39
+ done
40
+
41
+ # Unify duplicate translations
42
+ uniq-po:
43
+ for f in $(shell find ./ -name "*.po") ; do \
44
+ msguniq $$f -o $$f ; \
45
+ done
46
+
47
+ tx-pull:
48
+ tx pull -f
49
+ for f in $(POFILES) ; do \
50
+ sed -i 's/^\("Project-Id-Version: \).*$$/\1$(DOMAIN) $(VERSION)\\n"/' $$f; \
51
+ done
52
+ -git commit -a -m "i18n - pulling from tx"
53
+
54
+ reset-po:
55
+ # merging po files is unnecessary when using transifex.com
56
+ git checkout -- ../locale/*/*po
57
+
58
+ tx-update: tx-pull reset-po $(MOFILES)
59
+ # amend mo files
60
+ git add ../locale/*/LC_MESSAGES
61
+ git commit -a --amend -m "i18n - pulling from tx"
62
+ -echo Changes commited!
@@ -0,0 +1,19 @@
1
+ # foreman_ansible
2
+ #
3
+ # This file is distributed under the same license as foreman_ansible.
4
+ #
5
+ #, fuzzy
6
+ msgid ""
7
+ msgstr ""
8
+ "Project-Id-Version: version 0.0.1\n"
9
+ "Report-Msgid-Bugs-To: \n"
10
+ "POT-Creation-Date: 2014-08-20 08:46+0100\n"
11
+ "PO-Revision-Date: 2014-08-20 08:54+0100\n"
12
+ "Last-Translator: Foreman Team <foreman-dev@googlegroups.com>\n"
13
+ "Language-Team: Foreman Team <foreman-dev@googlegroups.com>\n"
14
+ "Language: \n"
15
+ "MIME-Version: 1.0\n"
16
+ "Content-Type: text/plain; charset=UTF-8\n"
17
+ "Content-Transfer-Encoding: 8bit\n"
18
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
+
@@ -0,0 +1,19 @@
1
+ # foreman_ansible
2
+ #
3
+ # This file is distributed under the same license as foreman_ansible.
4
+ #
5
+ #, fuzzy
6
+ msgid ""
7
+ msgstr ""
8
+ "Project-Id-Version: version 0.0.1\n"
9
+ "Report-Msgid-Bugs-To: \n"
10
+ "POT-Creation-Date: 2014-08-20 08:46+0100\n"
11
+ "PO-Revision-Date: 2014-08-20 08:46+0100\n"
12
+ "Last-Translator: Foreman Team <foreman-dev@googlegroups.com>\n"
13
+ "Language-Team: Foreman Team <foreman-dev@googlegroups.com>\n"
14
+ "Language: \n"
15
+ "MIME-Version: 1.0\n"
16
+ "Content-Type: text/plain; charset=UTF-8\n"
17
+ "Content-Transfer-Encoding: 8bit\n"
18
+ "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
19
+
data/locale/gemspec.rb ADDED
@@ -0,0 +1,2 @@
1
+ # Matches foreman_ansible.gemspec
2
+ _('Ansible support in Foreman')
@@ -0,0 +1,528 @@
1
+ {
2
+ "_type": "ansible",
3
+ "_timestamp": "2015-10-29 20:01:51 +0100",
4
+ "ansible_facts": {
5
+ "ansible_all_ipv4_addresses": [
6
+ "10.36.112.22",
7
+ "192.168.0.105",
8
+ "192.168.100.1",
9
+ "192.168.121.1"
10
+ ],
11
+ "ansible_all_ipv6_addresses": [
12
+ "fe80::6257:18ff:fe52:8997"
13
+ ],
14
+ "ansible_architecture": "x86_64",
15
+ "ansible_bios_date": "12/03/2014",
16
+ "ansible_bios_version": "1.00",
17
+ "ansible_cmdline": {
18
+ "BOOT_IMAGE": "/vmlinuz-4.2.3-200.fc22.x86_64",
19
+ "LANG": "en_US.UTF-8",
20
+ "quiet": true,
21
+ "rd.luks.uuid": "luks-9faf39c3-a3b4-49a7-a1ae-f7ad842ae1ad",
22
+ "rd.lvm.lv": "fedora/root",
23
+ "rhgb": true,
24
+ "ro": true,
25
+ "root": "/dev/mapper/fedora-root",
26
+ "vconsole.font": "latarcyrheb-sun16"
27
+ },
28
+ "ansible_date_time": {
29
+ "date": "2015-10-25",
30
+ "day": "25",
31
+ "epoch": "1445762978",
32
+ "hour": "09",
33
+ "iso8601": "2015-10-25T08:49:38Z",
34
+ "iso8601_micro": "2015-10-25T08:49:38.050218Z",
35
+ "minute": "49",
36
+ "month": "10",
37
+ "second": "38",
38
+ "time": "09:49:38",
39
+ "tz": "CET",
40
+ "tz_offset": "+0100",
41
+ "weekday": "Sunday",
42
+ "year": "2015"
43
+ },
44
+ "ansible_default_ipv4": {
45
+ "address": "192.168.0.105",
46
+ "alias": "wlp2s0",
47
+ "gateway": "192.168.0.1",
48
+ "interface": "wlp2s0",
49
+ "macaddress": "60:57:18:52:89:97",
50
+ "mtu": 1500,
51
+ "netmask": "255.255.255.0",
52
+ "network": "192.168.0.0",
53
+ "type": "ether"
54
+ },
55
+ "ansible_default_ipv6": {},
56
+ "ansible_devices": {
57
+ "sda": {
58
+ "holders": [],
59
+ "host": "SATA controller: Intel Corporation Wildcat Point-LP SATA Controller [AHCI Mode] (rev 03)",
60
+ "model": "INTEL SSDSC2CW18",
61
+ "partitions": {
62
+ "sda1": {
63
+ "sectors": "409600",
64
+ "sectorsize": 512,
65
+ "size": "200.00 MB",
66
+ "start": "2048"
67
+ },
68
+ "sda2": {
69
+ "sectors": "1024000",
70
+ "sectorsize": 512,
71
+ "size": "500.00 MB",
72
+ "start": "411648"
73
+ },
74
+ "sda3": {
75
+ "sectors": "350216192",
76
+ "sectorsize": 512,
77
+ "size": "167.00 GB",
78
+ "start": "1435648"
79
+ }
80
+ },
81
+ "removable": "0",
82
+ "rotational": "0",
83
+ "scheduler_mode": "noop",
84
+ "sectors": "351651888",
85
+ "sectorsize": "512",
86
+ "size": "167.68 GB",
87
+ "support_discard": "512",
88
+ "vendor": "ATA"
89
+ },
90
+ "sdb": {
91
+ "holders": [],
92
+ "host": "USB controller: Intel Corporation Wildcat Point-LP USB xHCI Controller (rev 03)",
93
+ "model": "BUP Slim BK",
94
+ "partitions": {
95
+ "sdb1": {
96
+ "sectors": "3907027119",
97
+ "sectorsize": 512,
98
+ "size": "1.82 TB",
99
+ "start": "2048"
100
+ }
101
+ },
102
+ "removable": "0",
103
+ "rotational": "1",
104
+ "scheduler_mode": "cfq",
105
+ "sectors": "3907029167",
106
+ "sectorsize": "512",
107
+ "size": "1.82 TB",
108
+ "support_discard": "0",
109
+ "vendor": "Seagate"
110
+ }
111
+ },
112
+ "ansible_distribution": "Fedora",
113
+ "ansible_distribution_major_version": "22",
114
+ "ansible_distribution_release": "Twenty Two",
115
+ "ansible_distribution_version": "22",
116
+ "ansible_domain": "",
117
+ "ansible_env": {
118
+ "CLASSPATH": "/home/daniel/.clojure/clojure.jar",
119
+ "DBUS_SESSION_BUS_ADDRESS": "unix:abstract=/tmp/dbus-bh57wQqRfB,guid=2a1343048f3ce552e1c98f71562c8fda",
120
+ "DESKTOP_AUTOSTART_ID": "10d10bb495d82a063144576098663788900000023410002",
121
+ "DESKTOP_SESSION": "gnome",
122
+ "DISPLAY": ":0",
123
+ "EDITOR": "vim",
124
+ "GDMSESSION": "gnome",
125
+ "GDM_LANG": "en_US.utf8",
126
+ "GNOME_DESKTOP_SESSION_ID": "this-is-deprecated",
127
+ "GOPATH": "/home/daniel/.gopath",
128
+ "GPGKEY": "38D6DE30",
129
+ "GPG_AGENT_INFO": "/run/user/1000/keyring/gpg:0:1",
130
+ "GUESTFISH_INIT": "\\e[1;34m",
131
+ "GUESTFISH_OUTPUT": "\\e[0m",
132
+ "GUESTFISH_PS1": "\\[\\e[1;32m\\]><fs>\\[\\e[0;31m\\] ",
133
+ "GUESTFISH_RESTORE": "\\e[0m",
134
+ "HISTCONTROL": "ignoreboth",
135
+ "HISTSIZE": "1000",
136
+ "HOME": "/home/daniel",
137
+ "HOSTNAME": "localhost.localdomain",
138
+ "IMSETTINGS_INTEGRATE_DESKTOP": "yes",
139
+ "IMSETTINGS_MODULE": "none",
140
+ "KDEDIRS": "/usr",
141
+ "KDE_IS_PRELINKED": "1",
142
+ "LANG": "en_US.UTF-8",
143
+ "LC_CTYPE": "en_US.UTF-8",
144
+ "LC_MEASUREMENT": "en_US.utf8",
145
+ "LC_MONETARY": "en_US.utf8",
146
+ "LC_NUMERIC": "en_US.utf8",
147
+ "LC_PAPER": "en_US.utf8",
148
+ "LC_TIME": "en_US.utf8",
149
+ "LD_LIBRARY_PATH": ":/usr/local/lib:/usr/local/lib",
150
+ "LESSOPEN": "|/usr/bin/lesspipe.sh %s",
151
+ "LOGNAME": "daniel",
152
+ "LS_COLORS": "rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:",
153
+ "MAIL": "/var/spool/mail/daniel",
154
+ "PATH": "/home/daniel/.rbenv/shims:/home/daniel/.gopath/bin:/home/daniel/.rbenv/bin:/usr/local/heroku/bin:/home/daniel/.bin:/home/daniel/perl5/bin:/home/daniel/.rbenv/shims:/home/daniel/.gopath/bin:/home/daniel/.rbenv/bin:/usr/local/heroku/bin:/home/daniel/.bin:/home/daniel/perl5/bin:/home/daniel/.rbenv/shims:/home/daniel/.gopath/bin:/home/daniel/.rbenv/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/daniel/.lein/bin:/usr/local/go/bin:/home/daniel/workspace/etcd-v0.4.6-linux-amd64:/home/daniel/.lein/bin:/usr/local/go/bin:/home/daniel/workspace/etcd-v0.4.6-linux-amd64",
155
+ "PERL5LIB": "/home/daniel/perl5/lib/perl5/x86_64-linux-gnu-thread-multi:/home/daniel/perl5/lib/perl5",
156
+ "PERL_LOCAL_LIB_ROOT": "/home/daniel/perl5",
157
+ "PERL_MB_OPT": "--install_base /home/daniel/perl5",
158
+ "PERL_MM_OPT": "INSTALL_BASE=/home/daniel/perl5",
159
+ "PWD": "/home/daniel",
160
+ "QTDIR": "/usr/lib64/qt-3.3",
161
+ "QTINC": "/usr/lib64/qt-3.3/include",
162
+ "QTLIB": "/usr/lib64/qt-3.3/lib",
163
+ "QT_GRAPHICSSYSTEM_CHECKED": "1",
164
+ "QT_IM_MODULE": "ibus",
165
+ "RBENV_SHELL": "bash",
166
+ "RUBY_GC_HEAP_INIT_SLOTS": "600000",
167
+ "RUBY_GC_MALLOC_LIMIT": "59000000",
168
+ "RUBY_HEAP_FREE_MIN": "100000",
169
+ "SESSION_MANAGER": "local/unix:@/tmp/.ICE-unix/2341,unix/unix:/tmp/.ICE-unix/2341",
170
+ "SHELL": "/bin/bash",
171
+ "SHLVL": "5",
172
+ "SSH_AUTH_SOCK": "/run/user/1000/keyring/ssh",
173
+ "TERM": "screen-256color",
174
+ "TMUX": "/tmp/tmux-1000/default,6825,1",
175
+ "TMUX_PANE": "%5",
176
+ "TMUX_PLUGIN_MANAGER_PATH": "/home/daniel/.tmux/plugins/",
177
+ "USER": "daniel",
178
+ "USERNAME": "daniel",
179
+ "VAGRANT_DEFAULT_PROVIDER": "libvirt",
180
+ "VAGRANT_HOME": "/run/media/daniel/Lobato-ext/vagrant_home",
181
+ "VTE_VERSION": "4002",
182
+ "WINDOWID": "37752328",
183
+ "WINDOWPATH": "2",
184
+ "XAUTHORITY": "/run/user/1000/gdm/Xauthority",
185
+ "XDG_CURRENT_DESKTOP": "GNOME",
186
+ "XDG_MENU_PREFIX": "gnome-",
187
+ "XDG_RUNTIME_DIR": "/run/user/1000",
188
+ "XDG_SEAT": "seat0",
189
+ "XDG_SESSION_DESKTOP": "gnome",
190
+ "XDG_SESSION_ID": "1",
191
+ "XDG_SESSION_TYPE": "x11",
192
+ "XDG_VTNR": "2",
193
+ "XMODIFIERS": "@im=ibus",
194
+ "_": "/usr/bin/python"
195
+ },
196
+ "ansible_fips": false,
197
+ "ansible_form_factor": "Notebook",
198
+ "ansible_fqdn": "ip6-localhost",
199
+ "ansible_hostname": "localhost",
200
+ "ansible_interfaces": [
201
+ "wlp2s0",
202
+ "lo",
203
+ "tun0",
204
+ "virbr1",
205
+ "virbr1-nic",
206
+ "virbr0-nic",
207
+ "virbr0"
208
+ ],
209
+ "ansible_kernel": "4.2.3-200.fc22.x86_64",
210
+ "ansible_lo": {
211
+ "active": true,
212
+ "device": "lo",
213
+ "ipv4": {
214
+ "address": "127.0.0.1",
215
+ "netmask": "255.0.0.0",
216
+ "network": "127.0.0.0"
217
+ },
218
+ "ipv6": [
219
+ {
220
+ "address": "::1",
221
+ "prefix": "128",
222
+ "scope": "host"
223
+ }
224
+ ],
225
+ "mtu": 65536,
226
+ "promisc": false,
227
+ "type": "loopback"
228
+ },
229
+ "ansible_lsb": {
230
+ "codename": "TwentyTwo",
231
+ "description": "Fedora release 22 (Twenty Two)",
232
+ "id": "Fedora",
233
+ "major_release": "22",
234
+ "release": "22"
235
+ },
236
+ "ansible_machine": "x86_64",
237
+ "ansible_machine_id": "aaee758309814c75aa47166f6a3f6528",
238
+ "ansible_memfree_mb": 3110,
239
+ "ansible_memory_mb": {
240
+ "nocache": {
241
+ "free": 5622,
242
+ "used": 2277
243
+ },
244
+ "real": {
245
+ "free": 3110,
246
+ "total": 7899,
247
+ "used": 4789
248
+ },
249
+ "swap": {
250
+ "cached": 0,
251
+ "free": 7943,
252
+ "total": 7943,
253
+ "used": 0
254
+ }
255
+ },
256
+ "ansible_memtotal_mb": 7899,
257
+ "ansible_mounts": [
258
+ {
259
+ "device": "/dev/mapper/fedora-root",
260
+ "fstype": "ext4",
261
+ "mount": "/",
262
+ "options": "rw,seclabel,relatime,data=ordered",
263
+ "size_available": 8082051072,
264
+ "size_total": 52710469632,
265
+ "uuid": "d5b7bf70-8edb-4f1e-8660-3dbe131e686c"
266
+ },
267
+ {
268
+ "device": "/dev/sda2",
269
+ "fstype": "ext4",
270
+ "mount": "/boot",
271
+ "options": "rw,seclabel,relatime,data=ordered",
272
+ "size_available": 305643520,
273
+ "size_total": 499355648,
274
+ "uuid": "d97426ce-6163-4870-bd9e-804431fb1200"
275
+ },
276
+ {
277
+ "device": "/dev/sda1",
278
+ "fstype": "vfat",
279
+ "mount": "/boot/efi",
280
+ "options": "rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=winnt,errors=remount-ro",
281
+ "size_available": 199536640,
282
+ "size_total": 209489920,
283
+ "uuid": "0688-3CD7"
284
+ },
285
+ {
286
+ "device": "/dev/mapper/fedora-home",
287
+ "fstype": "ext4",
288
+ "mount": "/home",
289
+ "options": "rw,seclabel,relatime,data=ordered",
290
+ "size_available": 35891396608,
291
+ "size_total": 115314737152,
292
+ "uuid": "5ed55b8b-78c0-4cf2-92c9-f5deb7b6b0e3"
293
+ },
294
+ {
295
+ "device": "/dev/sdb1",
296
+ "fstype": "ext4",
297
+ "mount": "/run/media/daniel/Lobato-ext",
298
+ "options": "rw,seclabel,nosuid,nodev,relatime,data=ordered",
299
+ "size_available": 1698020057088,
300
+ "size_total": 1968874328064,
301
+ "uuid": "f2d6e7a4-c8b1-4e9d-a863-aafe21045c45"
302
+ }
303
+ ],
304
+ "ansible_nodename": "localhost.localdomain",
305
+ "ansible_os_family": "RedHat",
306
+ "ansible_pkg_mgr": "yum",
307
+ "ansible_processor": [
308
+ "GenuineIntel",
309
+ "Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz",
310
+ "GenuineIntel",
311
+ "Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz",
312
+ "GenuineIntel",
313
+ "Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz",
314
+ "GenuineIntel",
315
+ "Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz"
316
+ ],
317
+ "ansible_processor_cores": 2,
318
+ "ansible_processor_count": 1,
319
+ "ansible_processor_threads_per_core": 2,
320
+ "ansible_processor_vcpus": 4,
321
+ "ansible_product_name": "Satellite Radius P55W-B",
322
+ "ansible_product_serial": "NA",
323
+ "ansible_product_uuid": "NA",
324
+ "ansible_product_version": "PSVP3U-003003",
325
+ "ansible_python_version": "2.7.10",
326
+ "ansible_selinux": {
327
+ "config_mode": "enforcing",
328
+ "mode": "enforcing",
329
+ "policyvers": 29,
330
+ "status": "enabled",
331
+ "type": "targeted"
332
+ },
333
+ "ansible_ssh_host_key_ecdsa_public": "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJMuJBBJ2PIk0MTfvMvdN7g1bdW9rvAG0UHbF/1ynaQj31VzgV+CnSxVatBILoyCirsWd1XzL3NqZWe2nb2uTvs=",
334
+ "ansible_ssh_host_key_rsa_public": "AAAAB3NzaC1yc2EAAAADAQABAAABAQCkZi151LY8bftE7U2psYf9R/FeMjk693GLRaGDZsO0uC+3fZ5gsYqNZBb2A/Hm2QqrGkxRjcfG2bQnSc1hRm6mzTLbz8MGcflq/U22aWKTttSkbZXf41OxE3gYrcxw+6/vH8oT244BnADwtD6b8GKWGxpbNo1nRVHuY0SSSbn6Jbb29oj1Uz1n6Us7SJKB54BU5vndkp7d30m99mbdbExG99TTM8DVbjcPGNn1WltCMQN/x5g+UUnkml97H3jfpzaxU51OQayZRDLlfnMtehzcTrHbpnf6ib4KgxFRqra/eYIfxy0agMiKLWFnqzauj4L0lL9xKDf3g3zH1yIi5KCH",
335
+ "ansible_swapfree_mb": 7943,
336
+ "ansible_swaptotal_mb": 7943,
337
+ "ansible_system": "Linux",
338
+ "ansible_system_vendor": "TOSHIBA",
339
+ "ansible_tun0": {
340
+ "active": true,
341
+ "device": "tun0",
342
+ "ipv4": {
343
+ "address": "10.36.112.22",
344
+ "netmask": "255.255.252.0",
345
+ "network": "10.36.112.0"
346
+ },
347
+ "mtu": 1360,
348
+ "promisc": false
349
+ },
350
+ "ansible_user_dir": "/home/daniel",
351
+ "ansible_user_gecos": "Daniel Lobato",
352
+ "ansible_user_gid": 1000,
353
+ "ansible_user_id": "daniel",
354
+ "ansible_user_shell": "/bin/bash",
355
+ "ansible_user_uid": 1000,
356
+ "ansible_userspace_architecture": "x86_64",
357
+ "ansible_userspace_bits": "64",
358
+ "ansible_virbr0": {
359
+ "active": false,
360
+ "device": "virbr0",
361
+ "id": "8000.525400045537",
362
+ "interfaces": [
363
+ "virbr0-nic"
364
+ ],
365
+ "ipv4": {
366
+ "address": "192.168.100.1",
367
+ "netmask": "255.255.255.0",
368
+ "network": "192.168.100.0"
369
+ },
370
+ "macaddress": "52:54:00:04:55:37",
371
+ "mtu": 1500,
372
+ "promisc": false,
373
+ "stp": true,
374
+ "type": "bridge"
375
+ },
376
+ "ansible_virbr0_nic": {
377
+ "active": false,
378
+ "device": "virbr0-nic",
379
+ "macaddress": "52:54:00:04:55:37",
380
+ "mtu": 1500,
381
+ "promisc": true,
382
+ "type": "ether"
383
+ },
384
+ "ansible_virbr1": {
385
+ "active": false,
386
+ "device": "virbr1",
387
+ "id": "8000.525400fdfe87",
388
+ "interfaces": [
389
+ "virbr1-nic"
390
+ ],
391
+ "ipv4": {
392
+ "address": "192.168.121.1",
393
+ "netmask": "255.255.255.0",
394
+ "network": "192.168.121.0"
395
+ },
396
+ "macaddress": "52:54:00:fd:fe:87",
397
+ "mtu": 1500,
398
+ "promisc": false,
399
+ "stp": true,
400
+ "type": "bridge"
401
+ },
402
+ "ansible_virbr1_nic": {
403
+ "active": false,
404
+ "device": "virbr1-nic",
405
+ "macaddress": "52:54:00:fd:fe:87",
406
+ "mtu": 1500,
407
+ "promisc": true,
408
+ "type": "ether"
409
+ },
410
+ "ansible_virtualization_role": "host",
411
+ "ansible_virtualization_type": "kvm",
412
+ "ansible_wlp2s0": {
413
+ "active": true,
414
+ "device": "wlp2s0",
415
+ "ipv4": {
416
+ "address": "192.168.0.105",
417
+ "netmask": "255.255.255.0",
418
+ "network": "192.168.0.0"
419
+ },
420
+ "ipv6": [
421
+ {
422
+ "address": "fe80::6257:18ff:fe52:8997",
423
+ "prefix": "64",
424
+ "scope": "link"
425
+ }
426
+ ],
427
+ "macaddress": "60:57:18:52:89:97",
428
+ "module": "iwlwifi",
429
+ "mtu": 1500,
430
+ "promisc": false,
431
+ "type": "ether"
432
+ },
433
+ "facter_architecture": "x86_64",
434
+ "facter_blockdevice_sda_model": "INTEL SSDSC2CW18",
435
+ "facter_blockdevice_sda_size": 180045766656,
436
+ "facter_blockdevice_sda_vendor": "ATA",
437
+ "facter_blockdevice_sdb_model": "BUP Slim BK",
438
+ "facter_blockdevice_sdb_size": 2000398933504,
439
+ "facter_blockdevice_sdb_vendor": "Seagate",
440
+ "facter_blockdevices": "sda,sdb",
441
+ "facter_domain": "redhat.com",
442
+ "facter_facterversion": "1.7.6",
443
+ "facter_filesystems": "ext2,ext3,ext4,vfat",
444
+ "facter_fqdn": "papasitoisthebest.localdomaim",
445
+ "facter_hardwareisa": "x86_64",
446
+ "facter_hardwaremodel": "x86_64",
447
+ "facter_hostname": "localhost",
448
+ "facter_id": "daniel",
449
+ "facter_interfaces": "lo,tun0,virbr0,virbr1,virbr0_nic,virbr1_nic,wlp2s0",
450
+ "facter_ipaddress": "10.36.112.22",
451
+ "facter_ipaddress_lo": "127.0.0.1",
452
+ "facter_ipaddress_tun0": "10.36.112.22",
453
+ "facter_ipaddress_virbr0": "192.168.100.1",
454
+ "facter_ipaddress_virbr1": "192.168.121.1",
455
+ "facter_ipaddress_wlp2s0": "192.168.0.105",
456
+ "facter_is_virtual": "false",
457
+ "facter_kernel": "Linux",
458
+ "facter_kernelmajversion": "4.2",
459
+ "facter_kernelrelease": "4.2.3-200.fc22.x86_64",
460
+ "facter_kernelversion": "4.2.3",
461
+ "facter_lsbdistcodename": "TwentyTwo",
462
+ "facter_lsbdistdescription": "Fedora release 22 (Twenty Two)",
463
+ "facter_lsbdistid": "Fedora",
464
+ "facter_lsbdistrelease": "22",
465
+ "facter_lsbmajdistrelease": "22",
466
+ "facter_lsbrelease": ":core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch",
467
+ "facter_macaddress": "52:54:00:04:55:37",
468
+ "facter_macaddress_virbr0": "52:54:00:04:55:37",
469
+ "facter_macaddress_virbr0_nic": "52:54:00:04:55:37",
470
+ "facter_macaddress_virbr1": "52:54:00:fd:fe:87",
471
+ "facter_macaddress_virbr1_nic": "52:54:00:fd:fe:87",
472
+ "facter_macaddress_wlp2s0": "60:57:18:52:89:97",
473
+ "facter_memoryfree": "5.41 GB",
474
+ "facter_memoryfree_mb": "5539.58",
475
+ "facter_memorysize": "7.71 GB",
476
+ "facter_memorysize_mb": "7899.58",
477
+ "facter_memorytotal": "7.71 GB",
478
+ "facter_netmask": "255.255.252.0",
479
+ "facter_netmask_lo": "255.0.0.0",
480
+ "facter_netmask_tun0": "255.255.252.0",
481
+ "facter_netmask_virbr0": "255.255.255.0",
482
+ "facter_netmask_virbr1": "255.255.255.0",
483
+ "facter_netmask_wlp2s0": "255.255.255.0",
484
+ "facter_network_lo": "127.0.0.0",
485
+ "facter_network_tun0": "10.36.112.0",
486
+ "facter_network_virbr0": "192.168.100.0",
487
+ "facter_network_virbr1": "192.168.121.0",
488
+ "facter_network_wlp2s0": "192.168.0.0",
489
+ "facter_operatingsystem": "Fedora",
490
+ "facter_operatingsystemmajrelease": "22",
491
+ "facter_operatingsystemrelease": "22",
492
+ "facter_osfamily": "RedHat",
493
+ "facter_path": "/home/daniel/.rbenv/versions/2.1.5/bin:/home/daniel/.rbenv/libexec:/home/daniel/.rbenv/plugins/ruby-build/bin:/home/daniel/.rbenv/shims:/home/daniel/.gopath/bin:/home/daniel/.rbenv/bin:/usr/local/heroku/bin:/home/daniel/.bin:/home/daniel/perl5/bin:/home/daniel/.rbenv/shims:/home/daniel/.gopath/bin:/home/daniel/.rbenv/bin:/usr/local/heroku/bin:/home/daniel/.bin:/home/daniel/perl5/bin:/home/daniel/.rbenv/shims:/home/daniel/.gopath/bin:/home/daniel/.rbenv/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/daniel/.lein/bin:/usr/local/go/bin:/home/daniel/workspace/etcd-v0.4.6-linux-amd64:/home/daniel/.lein/bin:/usr/local/go/bin:/home/daniel/workspace/etcd-v0.4.6-linux-amd64",
494
+ "facter_physicalprocessorcount": 1,
495
+ "facter_processor0": "Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz",
496
+ "facter_processor1": "Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz",
497
+ "facter_processor2": "Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz",
498
+ "facter_processor3": "Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz",
499
+ "facter_processorcount": "4",
500
+ "facter_ps": "ps -ef",
501
+ "facter_rubysitedir": "/home/daniel/.rbenv/versions/2.1.5/lib/ruby/site_ruby/2.1.0",
502
+ "facter_rubyversion": "2.1.5",
503
+ "facter_selinux": "true",
504
+ "facter_selinux_config_mode": "enforcing",
505
+ "facter_selinux_config_policy": "unknown",
506
+ "facter_selinux_current_mode": "enforcing",
507
+ "facter_selinux_enforced": "true",
508
+ "facter_selinux_mode": "unknown",
509
+ "facter_selinux_policyversion": "29",
510
+ "facter_sshecdsakey": "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJMuJBBJ2PIk0MTfvMvdN7g1bdW9rvAG0UHbF/1ynaQj31VzgV+CnSxVatBILoyCirsWd1XzL3NqZWe2nb2uTvs=",
511
+ "facter_sshfp_ecdsa": "SSHFP 3 1 2827bab8f82a190f3d52c0710c0931b7af626b4a\nSSHFP 3 2 d3974d06cd78b740a64adf876c89f4d870b63283da7c3eec5b68376161f3e4e8",
512
+ "facter_sshfp_rsa": "SSHFP 1 1 50706ea8540d09102dabd80428b6257b58bc7fed\nSSHFP 1 2 8877052ac2498cc2892a8ee7f2d7d5b760a60a5c2b9cea52f02b52c6b0057d65",
513
+ "facter_sshrsakey": "AAAAB3NzaC1yc2EAAAADAQABAAABAQCkZi151LY8bftE7U2psYf9R/FeMjk693GLRaGDZsO0uC+3fZ5gsYqNZBb2A/Hm2QqrGkxRjcfG2bQnSc1hRm6mzTLbz8MGcflq/U22aWKTttSkbZXf41OxE3gYrcxw+6/vH8oT244BnADwtD6b8GKWGxpbNo1nRVHuY0SSSbn6Jbb29oj1Uz1n6Us7SJKB54BU5vndkp7d30m99mbdbExG99TTM8DVbjcPGNn1WltCMQN/x5g+UUnkml97H3jfpzaxU51OQayZRDLlfnMtehzcTrHbpnf6ib4KgxFRqra/eYIfxy0agMiKLWFnqzauj4L0lL9xKDf3g3zH1yIi5KCH",
514
+ "facter_swapfree": "7.76 GB",
515
+ "facter_swapfree_mb": "7944.00",
516
+ "facter_swapsize": "7.76 GB",
517
+ "facter_swapsize_mb": "7944.00",
518
+ "facter_timezone": "CET",
519
+ "facter_uniqueid": "007f0100",
520
+ "facter_uptime": "0:33 hours",
521
+ "facter_uptime_days": 0,
522
+ "facter_uptime_hours": 0,
523
+ "facter_uptime_seconds": 2018,
524
+ "facter_virtual": "physical",
525
+ "module_setup": true
526
+ },
527
+ "changed": false
528
+ }