Usage Guide¶
This guide provides detailed instructions on how to set up and run the Ansible playbooks on the differents supported targets.
MacOS¶
Ensure Apple's command line tools are installed
On a terminal launch the installer:
Starting from a brand-new machine.¶
-
Download this repository to your local drive.
-
Install requirements:
Create a temporary virtualenv, activate the virtualenv and install ansible:
/usr/bin/python3 -m venv .venv. .venv/bin/activatepip3 install ansibleInstalled -
Install required Ansible roles:
ansible-galaxy install -r requirements.ymlStarting galaxy role install process
...
Starting galaxy collection install process
...
fedejaure.dev_setup was installed successfully -
Copy
inventory.example
intoinventory
and set the desired<target-os>
(macos
):to e.g.:
-
Run the playbook:
ansible-playbook playbooks/main.yml --ask-become-pass -i inventoryBECOME password[defaults to SSH password]:
PLAY [Mac OSX Playbook] ***************************************************
TASK [Gathering Facts] ****************************************************
ok: [127.0.0.1]
...
Starting from a configured machine (Configuring a remote one)¶
-
Clone this repository.
-
Install dependencies:
poetry install --no-rootUsing python3.10 (3.10.8)
Creating virtualenv .venv
Installing dependencies from lock file
Package operations: 97 installs, 0 updates, 0 removals
... -
Activate the virtual environment:
poetry shellUsing python3.10 (3.10.8)
Spawning shell within .venv
(dev-setup)$ -
Install required Ansible roles:
inv galaxy-installStarting galaxy role install process
...
Starting galaxy collection install process
...
fedejaure.dev_setup was installed successfully -
Configure the
inventory
file and set the desired<target-os>
(macos
):[<target-os>] <ip address or hostname of the target> ansible_user=<target user> ansible_python_interpreter=/usr/bin/python3
Enable 'Remote Login'
- Go to System Preferences > Sharing.
- Enable 'Remote Login'.
You can also enable remote login on the command line
sudo systemsetup -setremotelogin on -
Run the playbook:
inv playbook --ask-pass --ask-become-passSSH password:
BECOME password[defaults to SSH password]:
PLAY [Mac OSX Playbook] ***************************************************
TASK [Gathering Facts] ****************************************************
ok: [127.0.0.1]
...
Linux¶
Warning
Linux support is in development and will be added in a future release.