Skip to content

darkwizard242/ansible-role-terraforming

Repository files navigation

build-test release Ansible Role Maintainability Rating Reliability Rating Security Rating GitHub tag (latest SemVer) GitHub repo size

Ansible Role: terraforming

Role to install terraforming on Debian/Ubuntu and EL systems. Terraforming is capable of exporting resources into terraform code.

Requirements

Terraforming is a gem and thus, it does require ruby installed. This role automatically installs ruby as well (if it's not already available).

Role Variables

Available variables are listed below (located in defaults/main.yml):

Variables list:

ruby_app_debian_package: ruby-full
ruby_app_el_package: ruby
ruby_desired_state: present
terraforming_app: terraforming
terraforming_desired_state: present
terraforming_user_install: no
terraforming_include_dependencies: yes

Variables table:

Variable Description
ruby_app_debian_package Defines the app to install on Debian based systems i.e. ruby-full
ruby_app_el_package Defines the app to install on Enterprise Linux (Redhat/CentOS) systems i.e. ruby
ruby_desired_state Defined to dynamically chose whether to install (i.e. either present or latest) or uninstall (i.e. absent) the package. Defaults to present.
terraforming_app Defines the app to install on Debian based systems i.e. terraforming
terraforming_desired_state Defined to dynamically chose whether to install (i.e. either present or latest) or uninstall (i.e. absent) the gem. Defaults to present.
terraforming_user_install Defined to dynamically set whether to install terraforming gem into a user's local gems.
terraforming_include_dependencies Defined to dynamically set whether to install relative dependencies of terraforming or not.

Dependencies

None

Example Playbook

For default behaviour of role (i.e. installation of terraforming gem) in ansible playbooks.

- hosts: servers
  roles:
    - darkwizard242.terraforming

For customizing behavior of role (i.e. removal of terraforming gem) in ansible playbooks.

- hosts: servers
  roles:
    - darkwizard242.terraforming
  vars:
    terraforming_desired_state: absent

For customizing behavior of role (i.e. installing terraforming without it's required dependencies) in ansible playbooks.

- hosts: servers
  roles:
    - darkwizard242.terraforming
  vars:
    terraforming_include_dependencies: no

License

MIT

Author Information

This role was created by Ali Muhammad, a DevOps/CloudOps Engineer who loves to learn and contribute to Open Source community.