https://github.com/sous-chefs/foreman
Development repository for the foreman cookbook
https://github.com/sous-chefs/foreman
chef chef-cookbook chef-resource foreman hacktoberfest managed-by-terraform
Last synced: about 1 month ago
JSON representation
Development repository for the foreman cookbook
- Host: GitHub
- URL: https://github.com/sous-chefs/foreman
- Owner: sous-chefs
- License: other
- Created: 2013-11-05T17:17:29.000Z (over 12 years ago)
- Default Branch: main
- Last Pushed: 2026-05-05T09:38:13.000Z (about 1 month ago)
- Last Synced: 2026-05-05T11:14:06.103Z (about 1 month ago)
- Topics: chef, chef-cookbook, chef-resource, foreman, hacktoberfest, managed-by-terraform
- Language: Ruby
- Homepage: https://supermarket.chef.io/cookbooks/foreman
- Size: 329 KB
- Stars: 9
- Watchers: 17
- Forks: 5
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Foreman cookbook
[](https://supermarket.chef.io/cookbooks/foreman)
[](https://github.com/sous-chefs/foreman/actions/workflows/ci.yml)
This cookbook now exposes custom resources for installing and configuring Foreman and Foreman Smart Proxy. The legacy `recipes/` and `attributes/` APIs were removed as part of the migration.
* Migration notes: [migration.md](migration.md)
* Platform and package constraints: [LIMITATIONS.md](LIMITATIONS.md)
## Resources
* `foreman_app`
Installs Foreman, renders application configuration, optionally prepares the database, and manages the `foreman` service.
* `foreman_proxy`
Installs Smart Proxy, renders `settings.yml` and module fragments, optionally configures DNS/DHCP/TFTP helpers, and manages the `foreman-proxy` service.
* `foreman_repo`
Configures the official Foreman APT repositories.
* `foreman_plugins`
Installs Foreman or Smart Proxy plugin packages.
* `foreman_rake`
Runs `foreman-rake` tasks.
* `foreman_smartproxy`
Registers or removes a Smart Proxy through the Foreman API.
* `foreman_proxy_settings_file`
Renders a module file under `/etc/foreman-proxy/settings.d/`.
## Supported platforms
* Debian 12
* Ubuntu 22.04
These limits are based on the current upstream package documentation summarized in [LIMITATIONS.md](LIMITATIONS.md).
## Usage
### Foreman server
```ruby
foreman_app 'default' do
server_name 'foreman.example'
database(
adapter: 'postgresql',
host: '127.0.0.1',
username: 'foreman',
password: 'super-secret'
)
end
foreman_plugins 'server-plugins' do
packages %w[foreman-libvirt ruby-foreman-chef]
end
```
### Foreman Smart Proxy
```ruby
foreman_proxy 'default' do
server_name 'foreman.example'
register false
dns(
enabled: true,
managed: true,
interface: 'eth0'
)
dhcp(
enabled: true,
managed: true,
interface: 'eth0',
range: '10.0.0.10 10.0.0.20'
)
tftp(
enabled: true
)
end
```
## Testing
* `cookstyle`
* `chef exec rspec --format documentation`
* `yamllint .`
* `markdownlint-cli2 "**/*.md"`
* `KITCHEN_LOCAL_YAML=kitchen.dokken.yml chef exec kitchen test default-ubuntu-2204 --destroy=always`
* `KITCHEN_LOCAL_YAML=kitchen.dokken.yml chef exec kitchen test proxy-debian-12 --destroy=always`