This project allows to install some of the most common dependencies in the host machine for server OS. Starting with Ubuntu 22.04 LTS
The repository configuration is simple, it contains the main ansible files:
ansible.cfg
playbooks
: contains the different Ansible resources for installation.dependencies
: this playbooks are configured to be executed for a set of targets.
- For docker execution:
Docker
- Only for the docker execution approach. Official installation instructions
- For local ansible execution:
Python 3.10+
Ansible
# Ubuntu installation
sudo apt-get update && sudo apt-get install -y python3 python3-pip
pip install ansible
# If local installation, include python bins in path
echo 'export PATH=/home/<user>/.local/bin:$PATH' > ${HOME}/.bashrc
There are several ways to execute it locally, depending on the use case.
- For localhost with password for sudo (
-K
is short version of--ask-become-pass
)
# For localhost
ansible-playbook playbooks/main.yml -i "localhost" -u $(id -un) -K
- In remote machine with private key (assuming
ubuntu
as the remote user. You can change for your matching).
ansible-playbook playbooks/main.yml -i "<remote-host>" -u ubuntu --private-key priv.key
Note
Do not forget to fetch the priv.key
and apply chmod 400 priv.key
or it will raise an error.
Tip
You can add the environment variable ANSIBLE_HOST_KEY_CHECKING=False
before the command execution if you face some issues. However, this is not a good security practice and should be avoided for production usage.
- Build docker image:
docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) --build-arg GROUP=$(id -gn) --build-arg USER=$(id -un) \
-t ansible:1.0 .
- Run docker image:
docker run -it --rm -v $(pwd):/app -w /app ansible:1.0 ansible-playbook playbooks/main.yml -i "<remote-host>" -u ubuntu --private-key priv.key
- Add Documentation
- Support automatic installations for Ubuntu family (20.04, 22.04 and 23.10)
- Contenerized execution prepared.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated 💹.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
- Fork the Project
- Create your Feature Branch
git checkout -b feature/AmazingFeature
- Commit your Changes
git commit -m 'Add some AmazingFeature
- Push to the Branch
git push origin feature/AmazingFeature
- Open a Pull Request
Distributed under the Apache 2.0
License. See LICENSE
for more information.
As we always state, our main purpose is keep learning, contributing to the community and finding ways to collaborate in interesting initiatives.
Do not hesitate to contact us at [email protected]
If you are interested in our content creation, also check our social media accounts. We have all sorts of training resources, blogs, hackathons, write-ups and more! Do not skip it, you will like it 😏 😏 😏 👍
Don't forget to give the project a star if you liked it! Thanks again! 🌟 💛