This repo contains most of the playbooks and roles that i wrote for assignments, projects and other things.
I'm not a professional, so don't expect too much from this repo.
- An ansible controller with ansible installed
- a node, reachable over ssh from the controller (with pubkey authentication))
- usually, a working internet connection on the node
- ansible
- openssh-server
- it probably also uses python somewhere
- kali linux 2020.1 (as ansible controller)
- raspberry pi 3b+ (as node)
After cloning this repo to the controller, making sure ansible is installed,
and ensuring a working ssh connection to the node, start by making your own inventory file in the root of this repo.
cd ansible
mkdir inventory
cd inventory
touch hosts
Then, add the node to the inventory file, like so:
[<group>]
<node>
ansible_host=<ip>
ansible_user=<user>
ansible_ssh_private_key_file=<path to private key>
After installing ansible, you can either run one of my playbooks using the following command:
ansible-playbook <playbook>.yml
Or you can go about creating your own playbook.
A playbook should have the following structure:
---
- hosts: <group>
become: yes # If you need root privileges
roles:
- <role> # If you want to use a role
tasks:
- name: <task> # Name of your task
<module>: <module options> # Module and options
If you want to contribute to this repo, you can do so by forking the repo and making a pull request.
Or just send me a message on LinkedIn or GitHub :)
Louis Declerck 2SNWB B