π Useful Ansible playbooks for easily deploy your website or webapp to absolutely fresh remote virtual server and automation many processes. Only 3 minutes from the playbook run to complete setup server and start it.
Useful Ansible playbooks for easily deploy your website or webapp to absolutely fresh virtual server (VDS/VPS or Droplet) launched on GNU/Linux. Only 3 minutes from the playbook run to complete setup server and start it. There you go! It just works.
git clone
this repository.Available playbooks
section).<playbook_name>
with (or without) arguments and extra vars:ansible-playbook <playbook_name>-playbook.yml [args] [extra vars...]
new_server
for auto configure a fresh remote virtual serverinstall_brotli
for install Brotli module to Nginxcreate_ssl
for create a new website with SSL certificate from Let's Encryptgithub_backup
for a backup automation of your GitHub accounts (repositories, gists, organizations)Follow Wikipedia page:
Ansible is an open-source software provisioning, configuration management, and application-deployment tool enabling infrastructure as code. It runs on many Unix-like systems, and can configure both Unix-like systems as well as Microsoft Windows. It includes its own declarative language to describe system configuration.
Ansible was written by Michael DeHaan and acquired by Red Hat in 2015. Ansible is agentless, temporarily connecting remotely via SSH or Windows Remote Management (allowing remote PowerShell execution) to do its tasks.
Ansible is a radically simple IT automation system. It handles configuration management, application deployment, cloud provisioning, ad-hoc task execution, network automation, and multi-node orchestration. Ansible makes complex changes like zero-downtime rolling updates with load balancers easy.
:octocat: GitHub: https://github.com/ansible/ansible
VS Code addons:
VS Code config hints:
For better readability, please add two association to your .vscode/settings.json
:
Ansible
playbooksjinja2
templates (which uses for Nginx
configs){
// ...
"files.associations": {
// ...
"*-domain.j*2": "NGINX", // for all jinja2 files ended with `domain` word
"*playbook.y*ml": "ansible" // for YAML files ended with `playbook` word
}
// ...
}
Beautify Ansible outputs:
Since Ansible v2.5.x
, you can enable beautify output by callback_plugins and auto convert this one line output:
TASK [Get SSL for domain] *******************************
fatal: [***]: FAILED! => {"changed": true, "cmd": ["certbot", "--nginx", "certonly", "--agree-tos", "-m", "[email protected]", "-d", "example.com", "-d", "www.example.com", "--dry-run"], "delta": "***", "end": "***", "msg": "non-zero return code", "rc": 1, "start": "***", "stderr": "..." ...
To awesome structured, like this:
TASK [Get SSL for domain] *******************************
fatal: [***]: FAILED! => changed=true
cmd:
- certbot
- --nginx
- certonly
- --agree-tos
- -m
- [email protected]
- -d
- example.com
- -d
- www.example.com
- --dry-run
delta: '***'
end: '***'
msg: non-zero return code
rc: 1
start: '***'
stderr: ...
...
To use it, please, edit the [defaults]
section in your Ansible config file (/etc/ansible/ansible.cfg
):
[defaults]
stdout_callback = yaml # Use the YAML callback plugin
bin_ansible_callbacks = True # Use the stdout_callback when running ad-hoc commands
A list of articles and video lessons, where useful-playbooks
is used:
Make pull request with links to your articles and videos! We will post them right here.
If you want to say thank you or/and support active development useful-playbooks
:
Thanks for your support! π Together, we make this project better every day.
MIT Β© Vic ShΓ³stak & True web artisans.