Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/koddr/useful-playbooks
π 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.
https://github.com/koddr/useful-playbooks
ansible ansible-playbook ansible-playbook-bundles ansible-playbook-pack ansible-playbook-samples ansible-playbooks automation deploy deployment deployment-automation droplet linux nginx ssl-certificate vds vps
Last synced: 5 days ago
JSON representation
π 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.
- Host: GitHub
- URL: https://github.com/koddr/useful-playbooks
- Owner: koddr
- License: mit
- Created: 2020-05-30T14:42:22.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-07-28T12:10:52.000Z (over 4 years ago)
- Last Synced: 2024-08-01T15:16:33.747Z (3 months ago)
- Topics: ansible, ansible-playbook, ansible-playbook-bundles, ansible-playbook-pack, ansible-playbook-samples, ansible-playbooks, automation, deploy, deployment, deployment-automation, droplet, linux, nginx, ssl-certificate, vds, vps
- Homepage: https://truewebartisans.com/microservices
- Size: 146 KB
- Stars: 77
- Watchers: 4
- Forks: 26
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# π Useful playbooks for easily deploy
Useful [Ansible](https://github.com/ansible/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**.
## β‘οΈ Quick start
1. Download [ZIP archive](https://github.com/truewebartisans/useful-playbooks/archive/master.zip) or `git clone` this repository.
2. Go to the downloaded or cloned folder.
3. Select a playbook (see [`Available playbooks`](https://github.com/truewebartisans/useful-playbooks#-available-playbooks) section).
4. Run `` with (_or without_) arguments and extra vars:```console
ansible-playbook -playbook.yml [args] [extra vars...]
```5. Enjoy! π
## π Available playbooks
- π [`new_server`](https://github.com/truewebartisans/useful-playbooks/blob/master/docs/new_server.md) for auto configure a fresh remote virtual server
- π [`install_brotli`](https://github.com/truewebartisans/useful-playbooks/blob/master/docs/install_brotli.md) for install Brotli module to Nginx
- π [`create_ssl`](https://github.com/truewebartisans/useful-playbooks/blob/master/docs/create_ssl.md) for create a new website with SSL certificate from Let's Encrypt
- π [`github_backup`](https://github.com/truewebartisans/useful-playbooks/blob/master/docs/github_backup.md) for a backup automation of your GitHub accounts (repositories, gists, organizations)## π‘ Required information about Ansible
π€ What is Ansible?
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._
π Why it's so good to use for me?
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.
- Have a dead simple setup process and a minimal learning curve.
- Manage machines very quickly and in parallel.
- Avoid custom-agents and additional open ports, be agentless by leveraging the existing SSH daemon.
- Describe infrastructure in a language that is both machine and human friendly.
- Focus on security and easy auditability/review/rewriting of content.
- Manage new remote machines instantly, without bootstrapping any software.
- Allow module development in any dynamic language, not just Python.
- Be usable as non-root.
- Be the easiest IT automation system to use, ever.:octocat: GitHub: https://github.com/ansible/ansible
π― How to work with Ansible and playbooks?
1. Be sure, that [Python](https://www.python.org/) (version `3.5` or later) is installed.
2. Install Ansible for your OS by [this](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-ansible) instructions.
3. Setting up inventory by [this](https://docs.ansible.com/ansible/latest/user_guide/intro_getting_started.html) guide.β Helpful hints, tools and plugins for working with Ansible
**VS Code addons:**
- [vscode-ansible](https://marketplace.visualstudio.com/items?itemName=vscoss.vscode-ansible) for code completion, syntax highlighting and linting of Ansible playbooks files
- [vscode-nginx](https://marketplace.visualstudio.com/items?itemName=shanoor.vscode-nginx) for syntax highlighting of Nginx configs**VS Code config hints:**
For better readability, please add two association to your `.vscode/settings.json`:
1. For `Ansible` playbooks
2. For `jinja2` templates (which uses for `Nginx` configs)```jsonc
{
// ...
"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](https://docs.ansible.com/ansible/2.5/plugins/callback.html) and auto convert this _one line_ output:
```bash
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:
```bash
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`):
```ini
[defaults]
stdout_callback = yaml # Use the YAML callback plugin
bin_ansible_callbacks = True # Use the stdout_callback when running ad-hoc commands
```## πΊ Media
A list of articles and video lessons, where `useful-playbooks` is used:
- [βοΈ How to install Brotli module for Nginx on Ubuntu 20.04+](https://dev.to/koddr/how-to-install-brotli-module-for-nginx-on-ubuntu-20-04-2ocp) @ 27 Jun 2020
- [β¨ A practical guide to GitHub Actions: build & deploy a static 11ty website to remote virtual server after push](https://dev.to/koddr/automate-that-a-practical-guide-to-github-actions-build-deploy-a-static-11ty-website-to-remote-virtual-server-after-push-d19) @ 01 Jun 2020
- [βοΈ Let's automate a backup process of your GitHub accounts, organizations & repositories](https://dev.to/koddr/let-s-automate-a-backup-process-of-your-github-accounts-organizations-repositories-46nd) @ 21 July 2020> Make [pull request](https://github.com/truewebartisans/useful-playbooks/pulls) with links to your articles and videos! We will post them right here.
## βοΈ Project assistance
If you want to say **thank you** or/and support active development `useful-playbooks`:
1. Add a :octocat: GitHub Star to the project.
2. Twit about project [on your Twitter](https://twitter.com/intent/tweet?text=Useful%20Ansible%20playbooks%20for%20easily%20deploy%20your%20website%20or%20webapp%20to%20absolutely%20fresh%20virtual%20server%20%28VDS%2FVPS%20or%20Droplet%29%20launched%20on%20GNU%2FLinux%20https%3A%2F%2Fgithub.com%2Ftruewebartisans%2Fuseful-playbooks).
3. Donate some money to project author via PayPal: [@paypal.me/koddr](https://paypal.me/koddr?locale.x=en_EN).
4. Join DigitalOcean at our [referral link](https://shrts.website/do/server) (your profit is **\$100** and we get \$25).
5. Buy awesome [domain name with **5%** discount](https://shrts.website/reg/domain) at REG.COM.Thanks for your support! π Together, we make this project better every day.
## β οΈ License
MIT Β© [Vic ShΓ³stak](https://github.com/koddr) & [True web artisans](https://1wa.co/).