theforeman.org | The new and improved Foreman website | Web Site library
kandi X-RAY | theforeman.org Summary
kandi X-RAY | theforeman.org Summary
This repo contains the source code for theforeman.org. All of the site's content is written in Markdown. If you're not familiar with it, fear not; it's easy to learn and to become rapidly productive!.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of theforeman.org
theforeman.org Key Features
theforeman.org Examples and Code Snippets
Community Discussions
Trending Discussions on theforeman.org
QUESTION
I am using Foreman 1.15.6.
I created an OS using the below payload. However, the templates are not associated with the OS. So, I had to manually associate the templates in Foreman UI.
The REST API doc https://www.theforeman.org/api/1.15/index.html does not show any parameters to set the default templates for an OS.
How to set default templates using REST API ?
I am using the below JSON payload for creating OS
...ANSWER
Answered 2018-Nov-27 at 09:31The Foreman API documentation is not really helpful.
I used the hammer set-default-template
in verbose mode to find the REST API call.
Below is the sample code to set the default templates for an OS using REST API
QUESTION
I am trying to register existing chef-nodes to Foreman. I followed:
https://www.theforeman.org/plugins/foreman_chef/0.5/index.html
This tells me to install chef_handler_foreman gem and put the following in /etc/chef/client.rb:
require 'chef_handler_foreman'
foreman_server_options 'https://your.proxy.server:8443'
foreman_facts_upload true
foreman_reports_upload true
foreman_enc true
I did both.
When I run chef-client , I get:
[root@ip-10-139-67-124 chef]# chef-client
[2017-06-29T13:25:09-04:00] FATAL: Configuration error LoadError: cannot load such file -- chef_handler_foreman
[2017-06-29T13:25:09-04:00] FATAL: /etc/chef/client.rb:4:in `from_string'
[2017-06-29T13:25:09-04:00] FATAL: Aborting due to error in '/etc/chef/client.rb'
[root@ip-10-139-67-124 chef]#
Here is the evidence that I have the gem installed:
[root@ip-10-139-67-124 chef]# gem list | grep chef
chef_handler_foreman (0.2.0)
I am running Redhat 7.3.
I have looked into the following question and few others. Answers to those suggest a case-sensitivity problem, which is not the case here:
What am I doing wrong? Any help is appreciated.
...ANSWER
Answered 2017-Jun-30 at 14:54You should check with /opt/chef/embedded/bin/gem list | grep foreman
.
I suspect you have the gem installed in your system ruby and not in chef's ruby bundled in the omnibus installer to avoid clashs with system ruby.
Usually you should use chef to install gem inside chef and configure itself.
Install gems with the chef_gem
resource and take advantage of the chef_client
cookbook to configure chef.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install theforeman.org
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page