Skip to content

Commit

Permalink
chore(readme): Add venv explainations
Browse files Browse the repository at this point in the history
  • Loading branch information
lafeychine committed Nov 5, 2023
1 parent 8a12a61 commit d6fc104
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
33 changes: 30 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,49 @@ This repository contains various scripts to setup and configure machines
handled by OSM-FR association (a french association for OpenStreetMap). These
scripts are used with [ansible](https://www.ansible.com/).

## Configuring ansible
## Installing dependencies

### Installing on Debian

A version of ansible >= 2.3 is sufficient, and is available in Debian,
or from [git repository](https://github.com/ansible/ansible.git). To install all
dependency on Debian, use:

```shell
apt-get install ansible python-jmespath
apt-get install ansible
```

To install VM through proxmox, python promoxer module is necessary, It can be
installed with:

```shell
sudo pip install proxmoxer
apt-get install python3-proxmoxer
```

### Installing using `venv`

`venv` module creates isolated Python environments.

First of all, install the required packages. On Debian, use:

```shell
apt-get install python3 python3-venv
```

You can jump into a new isolated environments using:

```shell
python3 -m venv <folder> # Create the environment, only needs to be done once
source <folder>/bin/activate # Run a subshell using the environment
```

Then, install the required packages:

```shell
pip install -r requirements.txt
```

Note: The created environment folder should be placed outside this project folder to prevent `ansible-lint` from looking at it.

## Using ansible scripts

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
ansible ~= 8.0
ansible-lint ~= 6.0
proxmoxer ~= 2.0
pylama ~= 8.0

0 comments on commit d6fc104

Please sign in to comment.