All Projects → while-true-do → Ansible Skeleton

while-true-do / Ansible Skeleton

Licence: bsd-3-clause
The skeleton to create new ansible roles.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Ansible Skeleton

Opengl cmake skeleton
❤️ A ready to use cmake skeleton using GLFW, Glew and glm. 👍
Stars: ✭ 118 (+2260%)
Mutual labels:  example, skeleton, template
Ansible In Action
Ansible playbook to deploy your Laravel code base to VPS
Stars: ✭ 61 (+1120%)
Mutual labels:  ansible, ansible-role, yaml
Molecule Ansible Docker Aws
Example project showing how to test Ansible roles with Molecule using Testinfra and a multiscenario approach with Docker, Vagrant & AWS EC2 as infrastructure providers
Stars: ✭ 72 (+1340%)
Mutual labels:  ansible, ansible-role, molecule
Ansible Prometheus
Deploy Prometheus monitoring system
Stars: ✭ 758 (+15060%)
Mutual labels:  ansible, molecule
ansible-ossec-server
Installing and maintaining the ossec-server for RedHat/Debian/Ubuntu.
Stars: ✭ 29 (+480%)
Mutual labels:  ansible-role, molecule
ansible-kafka
Ansible role for installing and configuring Apache Kafka on RedHat and Debian platforms.
Stars: ✭ 56 (+1020%)
Mutual labels:  ansible-role, molecule
Ansible Playbook Grapher
A command line tool to create a graph representing your Ansible playbook tasks and roles
Stars: ✭ 234 (+4580%)
Mutual labels:  ansible, ansible-role
Swaggen
OpenAPI/Swagger 3.0 Parser and Swift code generator
Stars: ✭ 385 (+7600%)
Mutual labels:  yaml, template
Ansible Consul
📡 Ansible role for Hashicorp Consul clusters
Stars: ✭ 320 (+6300%)
Mutual labels:  ansible, ansible-role
Ansible Role Nginx
Ansible role for NGINX
Stars: ✭ 404 (+7980%)
Mutual labels:  ansible, ansible-role
Ios Dev Playbook
不会运维的 iOS 开发不是好设计师。这个 Ansible Playbook 能快速配置 iOS 开发需要的服务,安装如 Gogs、GitLab、Jenkins、Ghost、Ajenti 等常用服务。
Stars: ✭ 542 (+10740%)
Mutual labels:  ansible, yaml
scala-basic-skeleton
Starting point if you want to bootstrap a project in Scala
Stars: ✭ 16 (+220%)
Mutual labels:  skeleton, example
hunt-skeleton
hunt framework project template.
Stars: ✭ 20 (+300%)
Mutual labels:  skeleton, example
Ansible Node Exporter
Provision basic metrics exporter for prometheus monitoring tool
Stars: ✭ 263 (+5160%)
Mutual labels:  ansible, molecule
Rvm1 Ansible
The official ansible RVM role to install and manage your Ruby versions.
Stars: ✭ 246 (+4820%)
Mutual labels:  ansible, ansible-role
Ansible Grafana
Platform for analytics and monitoring
Stars: ✭ 340 (+6700%)
Mutual labels:  ansible, molecule
Ansible Letsencrypt
An ansible role to generate TLS certificates and get them signed by Let's Encrypt
Stars: ✭ 433 (+8560%)
Mutual labels:  ansible, ansible-role
React Native Meteor Boilerplate
Stars: ✭ 637 (+12640%)
Mutual labels:  example, template
Postgresql
Fairly full featured Ansible role for Postgresql.
Stars: ✭ 684 (+13580%)
Mutual labels:  ansible, ansible-role
Ansible Role Awx
Ansible Role - AWX
Stars: ✭ 228 (+4460%)
Mutual labels:  ansible, ansible-role

Github (tag) Github (license) Github (issues) Github (pull requests)

Travis (com)

Ansible Skeleton

A Skeleton for developing Ansible Code for while-true-do.io.

Motivation

Creating a repository is always somewhat interesting and needs a lot explanation. This repository should help to reduce the effort and prepare a ready-to-use environment.

Description

This repository consists of several guidance and skeletons for Ansible:

  • provide template for new ansible roles
  • provide defaults for new ansible roles
  • provide steps for new ansible roles
  • provide guidance for ansible new roles

Coding Conventions

You can find the while-true-do.io conventions in the docs.

Requirements

Installation

Install from Github

git clone https://github.com/while-true-do/ansible-skeleton.git

Usage

Before creating a new role, please read the below information very carefully. They will explain, how a new role should look like and which steps are needed.

Install Ansible

The recommended and portable way to install Ansible is via virtualenv.

# Create a new virtualenv
virtualenv $env_name
# Activate virtualenv
source $env_name/bin/activate
# Install Ansible
pip install ansible

On some selinux enabled systems like Fedora, you have to symlink the selinux site-packages manually.

# Search local site-packages
find /usr/lib64 -iname "*selinux*"
# Now you have to symlink the selinux directory and the python-c-bindings
# Example:
cd $env_name
ln -s /usr/lib64/python3.7/site-packages/_selinux.cpython-37m-x86_64-linux-gnu.so ./lib/python3.7/site-packages/selinux
ln -s /usr/lib64/python3.7/site-packages/_selinux.cpython-37m-x86_64-linux-gnu.so ./lib/python3.7/site-packages/_selinux.cpython-37m-x86_64-linux-gnu.so

Furthermore, selinux requires you to allow docker to manage cgroups.

setsebool -P container_manage_cgroup on

Configure Ansible

Ansible configuration can be done in multiple files, depending on your needs.

# Edit system ansible.cfg
sudo vi /etc/ansible/ansible.cfg

# Edit user ansible.cfg
vi ~/.ansible.cfg

# Add one to the specific role
vi ansible.cfg (in the current directory)

You have to add the following lines:

[galaxy]
role_skeleton = <path_to_ansible-skeleton>/role
role_skeleton_ignore = ^.git$,^.*/.git_keep$

Install Molecule

Molecule must be installed in the same virtualenv (see above).

# Activate virtualenv
source $env_name/bin/activate
# Install molecule and docker support
pip install molecule[docker]

Create Ansible Role

Some manual steps are needed to create new role from scratch.

# Step 1: Create Directory from skeleton
ansible-galaxy init $role_name
mv $role_name while_true_do.$role_name

# Step 2: Review and Modify all "TODO" steps
grep -r "TODO" while_true_do.$role_name

Add Tests to the role

Testing is key for new roles. You want to get comfortable with the Ansible Testing Convention.

Testing

This repository is not tested.

Contribute

Thank you so much for considering to contribute. We are very happy, when somebody is joining the hard work. Please fell free to open Bugs, Feature Requests or Pull Requests after reading the Contribution Guideline.

See who has contributed already in the kudos.txt.

License

This work is licensed under a BSD-3-Clause License.

Contact

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].