Ansible: Difference between revisions

From AquaWiki
Jump to navigation Jump to search
(Created page with "== 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 thei...")
 
No edit summary
Line 1: Line 1:
== Getting Started ==
== 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.
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 dnf -y install python3 vim
     sudo apt -y install python3 vim
     sudo apt -y install python3 vim


    check if pip is installed
check if pip is installed
     python3 -m pip -V
     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.   
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
     curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
     python3 get-pip.py --user
     python3 get-pip.py --user
      
      
    Install Ansible
Install Ansible
     python3 -m pip install --user 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.
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
     sudo dnf -y install ansible


    If you wanted to upgrade
If you wanted to upgrade
     python3 -m pip install --upgrade --user ansible
     python3 -m pip install --upgrade --user ansible


    Check install and version of the ansible core package
Check install and version of the ansible core package
     ansible --version
     ansible --version


    To make life easier install ansible command shell completion
To make life easier install ansible command shell completion
     python3 -m pop install --user argcomplete
     python3 -m pop install --user argcomplete
     activate-global-python-argcomplete
     activate-global-python-argcomplete


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

Revision as of 12:10, 22 November 2022

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.