Eric Ohtake
2015-10-23 05:58:16 UTC
Guys,
I have a new installation of Foreman (v.1.9.2) in a new Ubuntu 14.04.03 and
everything is working great.
I have installed the plugin from Greg (foreman_default_hostgroup) to have
some automation on the grouping field and followed the instructions from
the Foreman's plugins page.
But my nodes are not being grouped at all.
I wrote a default_hostgroup.yaml with the config as follows:
---
:default_hostgroup:
:facts_map:
"Workstations/Location1":
"network_local_area_connection": "182.35.18.0"
"Workstations/Location2":
"network_local_area_connection": "182.35.20.0"
"Default":
"hostname": ".*"
I kept it simple so I could focus on making it to work but no luck.
This is what I have done so far:
Tried to use a even simpler fact like:
---
:default_hostgroup:
:facts_map:
"Linux":
"osfamily": "Debian"
"lsbdistcodename": "trusty"
Path of yaml file:
~/foreman/config/settings.plugins.d/default_hostgroup.yaml
Changed the settings force_hostgroup_match to true and
force_hostgroup_match_only_new to false.
Content of /var/log/foreman/production.log:
2015-10-23T14:30:42 [app] [I] Started POST "/api/hosts/facts" for
192.168.10.10 at 2015-10-23 14:30:42 +0900
2015-10-23T14:30:42 [app] [I] Processing by Api::V2::HostsController#facts
as JSON
2015-10-23T14:30:42 [app] [I] Parameters: {"facts"=>"[FILTERED]",
"name"=>"myserver.my.domain.com", "certname"=>"myserver.my.domain.com",
"apiv"=>"v2", :host=>{"name"=>"myserver.my.domain.com", "certname"=>"
myserver.my.domain.com"}}
2015-10-23T14:30:43 [app] [I] Import facts for 'myserver.my.domain.com'
completed. Added: 0, Updated: 5, Deleted 0 facts
*2015-10-23T14:30:43 [app] [W] DefaultHostgroupMatch: Could not load
default_hostgroup map from settings, check config.*
2015-10-23T14:30:43 [app] [I] Completed 201 Created in 408.4ms (Views:
8.0ms | ActiveRecord: 0.0ms)
2015-10-23T14:30:43 [app] [I] Started GET "/node/myserver.my.domain.com?format=yml"
for 192.168.10.10 at 2015-10-23 14:30:43 +0900
2015-10-23T14:30:43 [app] [I] Processing by HostsController#externalNodes
as YML
2015-10-23T14:30:43 [app] [I] Parameters: {"name"=>"myserver.my.domain.com
"}
2015-10-23T14:30:43 [app] [I] Rendered text template (0.0ms)
2015-10-23T14:30:43 [app] [I] Completed 200 OK in 124.5ms (Views: 0.8ms |
ActiveRecord: 12.0ms)
Would you guys have any ideas?
Thx
I have a new installation of Foreman (v.1.9.2) in a new Ubuntu 14.04.03 and
everything is working great.
I have installed the plugin from Greg (foreman_default_hostgroup) to have
some automation on the grouping field and followed the instructions from
the Foreman's plugins page.
But my nodes are not being grouped at all.
I wrote a default_hostgroup.yaml with the config as follows:
---
:default_hostgroup:
:facts_map:
"Workstations/Location1":
"network_local_area_connection": "182.35.18.0"
"Workstations/Location2":
"network_local_area_connection": "182.35.20.0"
"Default":
"hostname": ".*"
I kept it simple so I could focus on making it to work but no luck.
This is what I have done so far:
Tried to use a even simpler fact like:
---
:default_hostgroup:
:facts_map:
"Linux":
"osfamily": "Debian"
"lsbdistcodename": "trusty"
Path of yaml file:
~/foreman/config/settings.plugins.d/default_hostgroup.yaml
Changed the settings force_hostgroup_match to true and
force_hostgroup_match_only_new to false.
Content of /var/log/foreman/production.log:
2015-10-23T14:30:42 [app] [I] Started POST "/api/hosts/facts" for
192.168.10.10 at 2015-10-23 14:30:42 +0900
2015-10-23T14:30:42 [app] [I] Processing by Api::V2::HostsController#facts
as JSON
2015-10-23T14:30:42 [app] [I] Parameters: {"facts"=>"[FILTERED]",
"name"=>"myserver.my.domain.com", "certname"=>"myserver.my.domain.com",
"apiv"=>"v2", :host=>{"name"=>"myserver.my.domain.com", "certname"=>"
myserver.my.domain.com"}}
2015-10-23T14:30:43 [app] [I] Import facts for 'myserver.my.domain.com'
completed. Added: 0, Updated: 5, Deleted 0 facts
*2015-10-23T14:30:43 [app] [W] DefaultHostgroupMatch: Could not load
default_hostgroup map from settings, check config.*
2015-10-23T14:30:43 [app] [I] Completed 201 Created in 408.4ms (Views:
8.0ms | ActiveRecord: 0.0ms)
2015-10-23T14:30:43 [app] [I] Started GET "/node/myserver.my.domain.com?format=yml"
for 192.168.10.10 at 2015-10-23 14:30:43 +0900
2015-10-23T14:30:43 [app] [I] Processing by HostsController#externalNodes
as YML
2015-10-23T14:30:43 [app] [I] Parameters: {"name"=>"myserver.my.domain.com
"}
2015-10-23T14:30:43 [app] [I] Rendered text template (0.0ms)
2015-10-23T14:30:43 [app] [I] Completed 200 OK in 124.5ms (Views: 0.8ms |
ActiveRecord: 12.0ms)
Would you guys have any ideas?
Thx
--
You received this message because you are subscribed to the Google Groups "Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+***@googlegroups.com.
To post to this group, send email to foreman-***@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+***@googlegroups.com.
To post to this group, send email to foreman-***@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.