项目作者: iormundr

项目描述 :
Script for creating ansible dir structure
高级语言: Python
项目地址: git://github.com/iormundr/Ansible-Dirs-Creation.git
创建时间: 2018-08-30T02:23:22Z
项目社区:https://github.com/iormundr/Ansible-Dirs-Creation

开源协议:

下载


Ansible-Dirs-Creation

Script for creating ansible dir structure

Usage: ./create_playbook.py /path/to/playbookname [role1 role2 …]

Creates an empty playbook skeleton, with any roles that are specified.
e.g. ./create_plafybook.py /tmp/pyplaybook web db cache
If /path/to/playbookname already exists, we only create the roles that don’t exist yet, according to our structure.

  1. ###############################################################################
  2. group_vars/
  3. all # The main file for defining variables for this playbook
  4. roles/
  5. role1/ # Each role
  6. files/ # Role-specific files which will be copied to the remote machine
  7. handlers/ # Role-specific handlers
  8. main.yml # handler file
  9. tasks/ # Role-specific tasks
  10. main.yml # task file
  11. templates/ # Role-specific templates
  12. vars # Role-specific variables, although I recommend using group_vars/all instead
  13. meta/ # Files that establish role dependencies
  14. ###############################################################################

I’m putting more emphasis on well-structured roles here, and less on external
dependencies/playbooks.