Ansible

From AquaWiki
Revision as of 12:10, 22 November 2022 by 216.81.81.80 (talk)
Jump to navigation Jump to search

Getting Started

All nodes will need to have python3, for example. After python is installed on clients there should be no need to ever log into them again, only their IP addresses or host names will be needed.

   sudo dnf -y install python3 vim
   sudo apt -y install python3 vim

check if pip is installed

   python3 -m pip -V

if not run the following. Have a look at the file if you'd like, it's the pip package zipped up and base85 encoded.

   curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
   python3 get-pip.py --user
   

Install Ansible

   python3 -m pip install --user ansible

If using Fedora ansible can also be installed with the following. For Debian/Ubuntu you'll likely need to add repos for apt, but the above will work.

   sudo dnf -y install ansible

If you wanted to upgrade

   python3 -m pip install --upgrade --user ansible

Check install and version of the ansible core package

   ansible --version

To make life easier install ansible command shell completion

   python3 -m pop install --user argcomplete
   activate-global-python-argcomplete

If using zsh, tcsh google it. and shame on you for using tsch.