ewypych / ansible_template_galaxy

ansible role to manage the ansible project structure (create initial structure, add new role, etc...)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ansible template with Galaxy Build Status

This role allow ansible newbies to create a standard project structure as explain below with optionally install Galaxy Roles

Ansible best practices

Requirements

none

Role Variables

bpath = the path of where the role structure will be generated (default=/tmp/ansible_project/)
brole = the name of the generated role (default=common)
bgalaxy = the name of the Galaxy Role(s) which you want to install (default=ewypych.ansible_template)

Dependencies

none

Example Playbook

You can change variables in the vars/main.yml file or edit your site.yml file with the following:

- hosts: localhost
  roles:
    - { role: ewypych.project_template, bpath: '/home/usr/devops-project', brole: 'samplerole', bgalaxy: 'boufnichel.project_template' }

Also you can install more Galaxy Roles than one, for example:

- hosts: localhost
  roles:
    - { role: ewypych.project_template, bpath: '/home/usr/devops-project', brole: 'samplerole', bgalaxy: ['ewypych.ansible_template', 'boufnichel.project_template'] }

or create more than one empty role:

- hosts: localhost
  roles:
    - { role: ewypych.project_template, bpath: '/home/usr/devops-project', brole: ['samplerole', 'anotherrole'], bgalaxy: 'ewypych.ansible_template'}

License

This Role was created as a fork of the boufnichel.project_template. It contains following changes:

  • installation of Galaxy Roles was added,
  • now Role creates also the group_vars and host_vars catalogs
  • files to copy were changed to templates
  • default vars were changed

GNU General Public License v3.0

Author Information

Emil Wypych, e-mail: @gmail

Author of the boufnichel.project_template: Mohamed Boufnichel

About

ansible role to manage the ansible project structure (create initial structure, add new role, etc...)