Skip to content

DeclerckLouis/ansible

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A collection of my ansible playbooks and roles

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.

Requirements

  • 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

Dependencies

Tested using

Usage

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

Contributing

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 :)

Author Information

Louis Declerck 2SNWB B

About

Ansible playbooks, roles, etc

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published