{"id":20398759,"url":"https://github.com/bcambl/puppet-environment","last_synced_at":"2026-03-06T07:32:50.251Z","repository":{"id":73990514,"uuid":"89311993","full_name":"bcambl/puppet-environment","owner":"bcambl","description":null,"archived":false,"fork":false,"pushed_at":"2017-11-15T22:18:49.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-16T00:27:49.753Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bcambl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-25T03:12:23.000Z","updated_at":"2017-08-28T22:23:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"efef220a-a09f-4438-910f-45b170020cb6","html_url":"https://github.com/bcambl/puppet-environment","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bcambl/puppet-environment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcambl%2Fpuppet-environment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcambl%2Fpuppet-environment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcambl%2Fpuppet-environment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcambl%2Fpuppet-environment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bcambl","download_url":"https://codeload.github.com/bcambl/puppet-environment/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcambl%2Fpuppet-environment/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30165638,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T04:43:31.446Z","status":"ssl_error","status_checked_at":"2026-03-06T04:40:30.133Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T04:23:59.052Z","updated_at":"2026-03-06T07:32:50.223Z","avatar_url":"https://github.com/bcambl.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Foreman/Puppet Environment\n\nSetup a basic Foreman/Puppet Environment using forklift \u0026 libvirt vagrant boxes  \n_16+ GB RAM Recommended_ for full deployment\n\n## Things to check before running script\n1. Virtualisation settings (BIOS)for your desktop\n    * mine were disabled by default\n2. Rename example_setup.yaml to setup.yaml\n3. Set the working directory for modules\n    * change the setting at the top of the setup.yaml file\n    * the playbook will fail if it is missing\n4. Set your version for foreman and uncomment the appropriate path variables in the setup.yaml\n    * repo default is version 1.12, which is Puppet 3 compatible\n5. Enable extra agents if required\n    * repo default is just a centos7 version\n    \n## Run script\nI made a quick Makefile, so you can just run `make`\n\nOptionally you can use:\n```\nansible-playbook setup.yaml\n```\n\n## Usage\nAssuming the playbook worked, you should now have at least 2 vagrant boxes, one for foreman, \ncalled `devforeman` and at least one agent, ie, `dev-c7`\n\n1. log into the `devforeman` and find the IP address\n    * alternately, you can look in the boxes.yaml file in the forklift directory\n        * `grep foreman.*hosts forklift/boxes.yaml`\n2. go to that IP in your browser, log in with admin account\n    * depending on version, password might be `changeme`\n    * to reset, `vagrant ssh devforeman`, `sudo foreman-rake permissions:reset`\n3. once that is working, start a new terminal and run: `vagrant rsync-auto devforeman` \n    * still will starting copying puppet modules into the `devforeman` box\n4. Foreman config:\n    * Add environment for development\n    * Import classes to get the puppet modules - might not need this\n    * Add host group and include the classes you are testing\n    * now change the host to be in the dev host group and add classes you want\n5. At this point your development environment should be ready to use\n    * modify your modules as needed\n    * dev clients will attempt to check in and update, or you can `puppet agent -t` them when desired\n\n\n## Troubleshooting\n* if you have problems getting to the foreman page through the browser with certificate errors,\n    check the firefox settings (advanced | certificates) and remove any you may have.\n    * this happens when you start a new box with the same name\n* it has been reported that some have had problems with autosync, but suspect that was before the playbooks were working\n    * needed to sign the cert in the devforeman box; `puppet cert --sign \u003chostname\u003e.example.com`\n\n## Other Considerations\n### Hiera\nI have a hiera directory saved in my puppet working directory, so it gets synced into the foreman box.\n\nI changed /etc/hiera.yaml to point the data directory there\n```\n[root@devforeman ~]# cat /etc/hiera.yaml \n---\n:backends:\n  - yaml\n:hierarchy:\n  - defaults\n  - \"%{clientcert}\"\n  - \"%{environment}\"\n  - \"nodes/%{::fqdn}\"\n  - \"common\"\n  - global\n\n:yaml:\n  :datadir: \"/etc/puppet/modules/hieraroot\"\n\n```\n\nThen I can modify hiera in an external editor\n\nI also needed to change the hierachy to match what we use in production, adding a common and a node/ directive\n\n### Interval time\nTo change how often a node checks in, run this on the node:  \n`puppet config set runinterval 300 --section agent`\n\n300 is the interval time in seconds, ie, 5 minutes\n\nYou also can specify time like 5m \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcambl%2Fpuppet-environment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcambl%2Fpuppet-environment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcambl%2Fpuppet-environment/lists"}