hadenlabs.common
ansible-role-common
ansible-role-common for hadenlabs.
Requirements
This is a list of applications that need to be installed previously to enjoy all the goodies of this configuration:
Usage
ansible-galaxy install hadenlabs.common
Full working examples can be found in examples folder.
Examples
packages
To run this playbook with default settings, for install package like this:
- hosts: all
vars:
user: ubuntu
common_packages:
- vim
- git
- build-essential
common_user: '{{ user }}'
roles:
- hadenlabs.common
Create Files
To run this playbook create a files playbook like this:
- hosts: all
vars:
user: ubuntu
common_user: '{{ user }}'
common_create_files:
- path: 'full_path/.env'
owner: '{{ user }}'
mode: '0755'
roles:
- hadenlabs.common
Create Directories
To run this playbook create a directories playbook like this:
- hosts: all
vars:
user: ubuntu
common_user: '{{ user }}'
common_create_directories:
- path: 'full_path/directory'
owner: '{{ user }}'
mode: '0755'
roles:
- hadenlabs.common
Deployment
To run this playbook deployment a files playbook like this:
- hosts: all
vars:
user: ubuntu
common_user: '{{ user }}'
common_deployments:
- name: '{{ app_name }}'
version: '{{ git.branch.deployment }}' # Could be a hash, branch or tag name
repo: '[email protected]:hadenlabs/test-repository'
force: yes
location: '{{ apps_path }}'
roles:
- hadenlabs.common
Environment
To run this playbook environment a files playbook like this:
- hosts: all
vars:
user: ubuntu
common_user: '{{ user }}'
common_environment_dict:
path: /usr/src/server/file
owner: '{{ user }}'
group: '{{ group_name }}'
permissions: '0640'
envs:
KEY: Value
roles:
- hadenlabs.common
Requirements
Role Variables
The default role variables in defaults/main.yml are:
# defaults file for ansible-role-common
Help
Got a question?
File a GitHub issue.
Contributing
See Contributing.
Module Versioning
This Module follows the principles of Semantic Versioning (SemVer).
Using the given version number of MAJOR.MINOR.PATCH, we apply the following constructs:
- Use the
MAJORversion for incompatible changes. - Use the
MINORversion when adding functionality in a backwards compatible manner. - Use the
PATCHversion when introducing backwards compatible bug fixes.
Backwards compatibility in 0.0.z and 0.y.z version
- In the context of initial development, backwards compatibility in versions
0.0.zis not guaranteed whenzis increased. (Initial development) - In the context of pre-release, backwards compatibility in versions
0.y.zis not guaranteed whenyis increased. (Pre-release)
Copyright
Copyright © 2018-2022 Hadenlabs
Trademarks
All other trademarks referenced herein are the property of their respective owners.
License
The code and styles are licensed under the LGPL-3.0 license See project license..
Don't forget to 🌟 Star 🌟 the repo if you like ansible-role-common
ansible-galaxy install hadenlabs.common