Skip to content

Ruby script to create a new Ansible Inventory based on puppet node/role folders and yaml files.

License

Notifications You must be signed in to change notification settings

jonnyhoeven/puppet-to-ansible

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 

Repository files navigation

Puppet to Ansible

This Ruby script can be used to create new Ansible inventories from YAML files in Puppet repository filesystems.

Reads YAML files from the data/nodes and data/roles directories for each environment, and builds inv representing your updated Ansible inventory.

The create_inventory.rb ruby script parses puppet environment filesystems and converts each role and host file to a single Ansible compatible inventory file.

Requirements

Ruby script

  • Ruby is included in most modern Linux distributions.
sudo apt install ruby
  • If you're using Windows, you can install Ruby from rubyinstaller.org.

  • All Puppet agents include Ruby The Ruby runtime environment on Puppet includes the Ruby language, some Ruby libraries and a set of Puppet specific gems.

Usage

Put this script in the root of your puppet environments folder, then change to the directory and run:

ruby create_inventory.rb > inventory.yaml

A new inventory.yaml file will be created.

What now?

You can use this inventory file to run Ansible playbooks on your environments, roles and nodes.

About

Ruby script to create a new Ansible Inventory based on puppet node/role folders and yaml files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages