Ansible: Difference between revisions
Jump to navigation
Jump to search
Line 236: | Line 236: | ||
| valign="top" | | | valign="top" | | ||
* [https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-ansible-on-ubuntu-20-04 Ansible » Install & Configure on Ubuntu 20.04] | * [https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-ansible-on-ubuntu-20-04 Ansible » Install & Configure on Ubuntu 20.04] | ||
* [https:// | * [https://www.ansible.com/blog/ansible-best-practices-essentials Ansible » Essentials Best Practices] | ||
* [https:// | * [https://www.digitalocean.com/community/tutorials/how-to-define-tasks-in-ansible-playbooks Ansible » Playbook » Define Tasks] | ||
* [https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_variables.html Ansible » Playbook » Variables] | * [https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_variables.html Ansible » Playbook » Variables] | ||
* [https://docs.ansible.com/ansible/latest/inventory_guide/ Ansible » Building Inventories] | * [https://docs.ansible.com/ansible/latest/inventory_guide/ Ansible » Building Inventories] | ||
Line 250: | Line 250: | ||
* [https://www.ansible.com/blog/developing-and-testing-ansible-roles-with-molecule-and-podman-part-1 Ansible » Test » Molecule » Podman » Roles » Part 1] | * [https://www.ansible.com/blog/developing-and-testing-ansible-roles-with-molecule-and-podman-part-1 Ansible » Test » Molecule » Podman » Roles » Part 1] | ||
* [https://www.ansible.com/blog/developing-and-testing-ansible-roles-with-molecule-and-podman-part-2 Ansible » Test » Molecule » Podman » Roles » Part 2] | * [https://www.ansible.com/blog/developing-and-testing-ansible-roles-with-molecule-and-podman-part-2 Ansible » Test » Molecule » Podman » Roles » Part 2] | ||
* [https:// | * [https://molecule.readthedocs.io/en/latest/getting-started.html Ansible » Test » Molecule » Getting Started] | ||
* [https://molecule.readthedocs.io/en/latest/ci.html Ansible » Test » Molecule » CI/CD] | |||
* [https://www.digitalocean.com/community/tutorials/how-to-set-up-ansible-inventories Ansible » Set Up Inventories] | * [https://www.digitalocean.com/community/tutorials/how-to-set-up-ansible-inventories Ansible » Set Up Inventories] | ||
* [https://spacelift.io/blog/ansible-variables Ansible » Types of Variables] | * [https://spacelift.io/blog/ansible-variables Ansible » Types of Variables] |
Revision as of 00:40, 27 November 2022
sudo apt update && sudo apt list --upgradeable
sudo apt upgrade && sudo apt install ansible
ansible --version
Playbook
chorke-academia-project ├─ main_playbook.yml └─ inventories/ ├─ staging/ │ └─ academia/ │ ├─ group_vars/ │ │ ├─ all.yaml │ │ └─ academia_group.yaml │ └─ inventory.yml └─ test/ └─ academia/ ├─ group_vars/ │ ├─ all.yaml │ └─ academia_group.yaml └─ inventory.yml
Modules
Namespaces
| ||
Knowledge
python3 -m venv .venv --prompt="academia"
# source .venv/bin/activate
# (academia) $
|
python3 -m venv .venv --prompt="molecule"
# source .venv/bin/activate
# (molecule) $
|
python -m venv .venv --prompt="molecule"
# .venv\Scripts\activate
# (molecule) PS>
|
| ||
pip install -r requirements.txt
pip freeze > requirements.txt
| ||
| ||
ansible-inventory -i inventory --list
|
ansible all -i inventory -m ping
|
ansible-playbook -i inventory playbook.yml
|