How to install Ansible in Arch Linux 2021.12.01 - Ansible install
The easier way to install the latest version of Ansible and maintain up-to-date in Arch Linux 2021.12.01 using Pacman and the Community repository.


How to install Ansible in Arch Linux? Today we’re going to talk about the easier way to install and maintain up-to-date Ansible in Arch Linux using the Community repository. I’m Luca Berton and welcome to today’s episode of Ansible Pilot.
How to install Ansible in Arch Linux
- ansible package included in Community default repositories
Today we’re talking about How to install Ansible in Arch Linux. The good news is that Ansible is included in the default repository so you could install it simply with your usual package manager “pacman”. You could expect the latest version of Ansible in the “Community” repository. At the moment is available the latest 5.0.
Links
The Best Resources For Ansible
Video Course
Printed Book
eBooks
- Ansible by Examples: 200+ Automation Examples For Linux and Windows System Administrator and DevOps
- Ansible For Windows By Examples: 50+ Automation Examples For Windows System Administrator And DevOps
- Ansible For Linux by Examples: 100+ Automation Examples For Linux System Administrator and DevOps
- Ansible Linux Filesystem By Examples: 40+ Automation Examples on Linux File and Directory Operation for Modern IT Infrastructure
- Ansible For Containers and Kubernetes By Examples: 20+ Automation Examples To Automate Containers, Kubernetes and OpenShift
- Ansible For Security by Examples: 100+ Automation Examples to Automate Security and Verify Compliance for IT Modern Infrastructure
- Ansible Tips and Tricks: 10+ Ansible Examples to Save Time and Automate More Tasks
- Ansible Linux Users & Groups By Examples: 20+ Automation Examples on Linux Users and Groups Operation for Modern IT Infrastructure
- Ansible For PostgreSQL by Examples: 10+ Examples To Automate Your PostgreSQL database
- Ansible For Amazon Web Services AWS By Examples: 10+ Examples To Automate Your AWS Modern Infrastructure
demo
Install Ansible in Arch Linux using “pacman” Package Manager using the Community repository.
code
- Install-Ansible-Arch Linux.sh
#!/bin/bash
sudo pacman -Syu
sudo pacman -Si ansible
sudo pacman -S ansible
sudo pacman -Q | grep ansible
execution
# pacman -Syu
:: Synchronizing package databases...
core 137.4 KiB 1174 KiB/s 00:00 [#######################################################################] 100%
extra 1585.5 KiB 4.11 MiB/s 00:00 [#######################################################################] 100%
community 5.8 MiB 5.06 MiB/s 00:01 [#######################################################################] 100%
:: Starting full system upgrade...
there is nothing to do
[[email protected] Linux vagrant]# pacman -Syu
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
:: Starting full system upgrade...
there is nothing to do
[[email protected] Linux vagrant]# pacman -Ss ansible
community/ansible 5.0.0-1
Official assortment of Ansible collections
community/ansible-bender 0.9.0-1
Build container images using Ansible playbooks
community/ansible-core 2.12.0-1
Radically simple IT automation platform
community/ansible-lint 5.2.1-1
Checks playbooks for practices and behaviour that could potentially be improved.
community/awxkit 19.5.0-1
cli client and python library for ansible awx (tower)
community/molecule 3.5.2-1
Aids in the development and testing of Ansible roles
community/python-ansible-compat 0.5.0-1
Functions that help interacting with various versions of Ansible
community/vim-ansible 3.2-1 (vim-plugins)
A vim plugin for syntax highlighting Ansible\'s common filetypes
[[email protected] Linux vagrant]# pacman -Si ansible
Repository : community
Name : ansible
Version : 5.0.0-1
Description : Official assortment of Ansible collections
Architecture : any
URL : https://pypi.org/project/ansible/
Licenses : GPL3
Groups : None
Provides : python-ansible_collections
Depends On : python ansible-core
Optional Deps : python-argcomplete: shell completions
python-pyopenssl: openssl modules
python-dnspython: for dig lookup
python-ovirt-engine-sdk: ovirt support
python-boto3: aws_s3 module
python-ldap: ldap support
python-proxmoxer: proxmos modules
python-openstacksdk: OpenStack module
python-pynetbox: NetBox module
python-ldap: LDAP modules
python-keyring: Keyring module
acme-tiny: openssl_certificate module
Conflicts With : None
Replaces : None
Download Size : 33.18 MiB
Installed Size : 446.93 MiB
Packager : Sven-Hendrik Haase <[email protected]>
Build Date : Wed 01 Dec 2021 10:43:25 AM UTC
Validated By : MD5 Sum SHA-256 Sum Signature
[[email protected] Linux vagrant]# pacman -S ansible
resolving dependencies...
looking for conflicting packages...
Packages (22) ansible-core-2.12.0-1 libsodium-1.0.18-2 libyaml-0.2.5-1 python-appdirs-1.4.4-3 python-bcrypt-3.2.0-3 python-cffi-1.15.0-1 python-cryptography-35.0.0-1 python-jinja-3.0.3-1
python-markupsafe-2.0.1-1 python-more-itertools-8.10.0-1 python-ordered-set-4.0.2-3 python-packaging-20.9-2 python-paramiko-2.7.2-3 python-ply-3.11-8 python-pycparser-2.21-1
python-pynacl-1.4.0-3 python-pyparsing-2.4.7-3 python-resolvelib-0.5.5-2 python-setuptools-1:57.4.0-2 python-six-1.16.0-1 python-yaml-5.4.1.1-2 ansible-5.0.0-1
Total Download Size: 38.71 MiB
Total Installed Size: 478.14 MiB
:: Proceed with installation? [Y/n] y
before execution
$ ssh [email protected] Linux.example.com
[[email protected] Linux ~]$ sudo su
[[email protected] Linux devops]# cat /etc/os-release
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://Arch Linux.org/"
DOCUMENTATION_URL="https://wiki.Arch Linux.org/"
SUPPORT_URL="https://bbs.Arch Linux.org/"
BUG_REPORT_URL="https://bugs.Arch Linux.org/"
LOGO=Arch Linux-logo
[[email protected] Linux devops]# hostnamectl -f
hostnamectl: invalid option -- 'f'
[[email protected] Linux devops]# hostnamectl
Static hostname: Arch Linux
Icon name: computer-vm
Chassis: vm
Machine ID: 8d40490b47e14e5997d41b66db80c357
Boot ID: b74b1844354e4385847affc2c721179f
Virtualization: oracle
Operating System: Arch Linux
Kernel: Linux 5.15.5-arch1-1
Architecture: x86-64
Hardware Vendor: innotek GmbH
Hardware Model: VirtualBox
[[email protected] Linux devops]# cat /etc/arch-release
[[email protected] Linux devops]# pacman -Q | grep ansible
[[email protected] Linux devops]#
after execution
$ ssh [email protected] Linux.example.com
[[email protected] Linux ~]$ sudo su
[[email protected] Linux devops]# cat /etc/os-release
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://Arch Linux.org/"
DOCUMENTATION_URL="https://wiki.Arch Linux.org/"
SUPPORT_URL="https://bbs.Arch Linux.org/"
BUG_REPORT_URL="https://bugs.Arch Linux.org/"
LOGO=Arch Linux-logo
[[email protected] Linux devops]# hostnamectl -f
hostnamectl: invalid option -- 'f'
[[email protected] Linux devops]# hostnamectl
Static hostname: Arch Linux
Icon name: computer-vm
Chassis: vm
Machine ID: 8d40490b47e14e5997d41b66db80c357
Boot ID: b74b1844354e4385847affc2c721179f
Virtualization: oracle
Operating System: Arch Linux
Kernel: Linux 5.15.5-arch1-1
Architecture: x86-64
Hardware Vendor: innotek GmbH
Hardware Model: VirtualBox
[[email protected] Linux devops]# cat /etc/arch-release
[[email protected] Linux devops]# pacman -Syu
:: Synchronizing package databases...
core 137.3 KiB 1002 KiB/s 00:00 [################################] 100%
extra 1585.4 KiB 3.97 MiB/s 00:00 [################################] 100%
community 5.8 MiB 5.39 MiB/s 00:01 [################################] 100%
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
Packages (1) ca-certificates-mozilla-3.73-1
Total Download Size: 0.33 MiB
Total Installed Size: 0.91 MiB
Net Upgrade Size: 0.00 MiB
:: Proceed with installation? [Y/n] y
:: Retrieving packages...
ca-certificates-mozilla-3... 337.3 KiB 4.99 MiB/s 00:00 [################################] 100%
(1/1) checking keys in keyring [################################] 100%
(1/1) checking package integrity [################################] 100%
(1/1) loading package files [################################] 100%
(1/1) checking for file conflicts [################################] 100%
(1/1) checking available disk space [################################] 100%
:: Processing package changes...
(1/1) upgrading ca-certificates-mozilla [################################] 100%
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Rebuilding certificate stores...
[[email protected] Linux devops]# pacman -Si ansible
Repository : community
Name : ansible
Version : 5.0.0-1
Description : Official assortment of Ansible collections
Architecture : any
URL : https://pypi.org/project/ansible/
Licenses : GPL3
Groups : None
Provides : python-ansible_collections
Depends On : python ansible-core
Optional Deps : python-argcomplete: shell completions
python-pyopenssl: openssl modules
python-dnspython: for dig lookup
python-ovirt-engine-sdk: ovirt support
python-boto3: aws_s3 module
python-ldap: ldap support
python-proxmoxer: proxmos modules
python-openstacksdk: OpenStack module
python-pynetbox: NetBox module
python-ldap: LDAP modules
python-keyring: Keyring module
acme-tiny: openssl_certificate module
Conflicts With : None
Replaces : None
Download Size : 33.18 MiB
Installed Size : 446.93 MiB
Packager : Sven-Hendrik Haase <[email protected]>
Build Date : Wed 01 Dec 2021 10:43:25 AM UTC
Validated By : MD5 Sum SHA-256 Sum Signature
[[email protected] Linux devops]# pacman -S ansible
resolving dependencies...
looking for conflicting packages...
Packages (22) ansible-core-2.12.0-1 libsodium-1.0.18-2 libyaml-0.2.5-1 python-appdirs-1.4.4-3
python-bcrypt-3.2.0-3 python-cffi-1.15.0-1 python-cryptography-35.0.0-1
python-jinja-3.0.3-1 python-markupsafe-2.0.1-1 python-more-itertools-8.10.0-1
python-ordered-set-4.0.2-3 python-packaging-20.9-2 python-paramiko-2.7.2-3
python-ply-3.11-8 python-pycparser-2.21-1 python-pynacl-1.4.0-3
python-pyparsing-2.4.7-3 python-resolvelib-0.5.5-2 python-setuptools-1:57.4.0-2
python-six-1.16.0-1 python-yaml-5.4.1.1-2 ansible-5.0.0-1
Total Download Size: 38.71 MiB
Total Installed Size: 478.14 MiB
:: Proceed with installation? [Y/n] y
:: Retrieving packages...
ansible-5.0.0-1-any 33.2 MiB 4.95 MiB/s 00:07 [################################] 100%
ansible-core-2.12.0-1-any 2.4 MiB 5.25 MiB/s 00:00 [################################] 100%
python-cryptography-35.0.... 843.6 KiB 4.65 MiB/s 00:00 [################################] 100%
python-setuptools-1:57.4.... 556.9 KiB 4.18 MiB/s 00:00 [################################] 100%
python-paramiko-2.7.2-3-any 270.2 KiB 2.09 MiB/s 00:00 [################################] 100%
python-jinja-3.0.3-1-any 233.1 KiB 2.13 MiB/s 00:00 [################################] 100%
python-cffi-1.15.0-1-x86_64 225.5 KiB 5.51 MiB/s 00:00 [################################] 100%
python-pycparser-2.21-1-any 187.3 KiB 2.90 MiB/s 00:00 [################################] 100%
libsodium-1.0.18-2-x86_64 175.0 KiB 1635 KiB/s 00:00 [################################] 100%
python-yaml-5.4.1.1-2-x86_64 173.2 KiB 2.11 MiB/s 00:00 [################################] 100%
python-pyparsing-2.4.7-3-any 117.3 KiB 882 KiB/s 00:00 [################################] 100%
python-pynacl-1.4.0-3-x86_64 89.9 KiB 1798 KiB/s 00:00 [################################] 100%
python-ply-3.11-8-any 76.3 KiB 2.26 MiB/s 00:00 [################################] 100%
python-more-itertools-8.1... 68.6 KiB 1595 KiB/s 00:00 [################################] 100%
libyaml-0.2.5-1-x86_64 59.2 KiB 637 KiB/s 00:00 [################################] 100%
python-packaging-20.9-2-any 52.9 KiB 1430 KiB/s 00:00 [################################] 100%
python-bcrypt-3.2.0-3-x86_64 29.0 KiB 271 KiB/s 00:00 [################################] 100%
python-resolvelib-0.5.5-2-any 23.5 KiB 294 KiB/s 00:00 [################################] 100%
python-six-1.16.0-1-any 23.2 KiB 494 KiB/s 00:00 [################################] 100%
python-markupsafe-2.0.1-1... 18.7 KiB 506 KiB/s 00:00 [################################] 100%
python-appdirs-1.4.4-3-any 15.0 KiB 320 KiB/s 00:00 [################################] 100%
python-ordered-set-4.0.2-... 13.5 KiB 161 KiB/s 00:00 [################################] 100%
Total (22/22) 38.7 MiB 4.02 MiB/s 00:10 [################################] 100%
(22/22) checking keys in keyring [################################] 100%
(22/22) checking package integrity [################################] 100%
(22/22) loading package files [################################] 100%
(22/22) checking for file conflicts [################################] 100%
(22/22) checking available disk space [################################] 100%
:: Processing package changes...
( 1/22) installing libyaml [################################] 100%
( 2/22) installing python-yaml [################################] 100%
( 3/22) installing python-ply [################################] 100%
( 4/22) installing python-pycparser [################################] 100%
( 5/22) installing python-cffi [################################] 100%
( 6/22) installing python-six [################################] 100%
( 7/22) installing python-bcrypt [################################] 100%
( 8/22) installing python-cryptography [################################] 100%
( 9/22) installing libsodium [################################] 100%
(10/22) installing python-pynacl [################################] 100%
(11/22) installing python-paramiko [################################] 100%
(12/22) installing python-appdirs [################################] 100%
(13/22) installing python-more-itertools [################################] 100%
(14/22) installing python-ordered-set [################################] 100%
(15/22) installing python-pyparsing [################################] 100%
(16/22) installing python-packaging [################################] 100%
(17/22) installing python-setuptools [################################] 100%
(18/22) installing python-markupsafe [################################] 100%
(19/22) installing python-jinja [################################] 100%
Optional dependencies for python-jinja
python-babel: for i18n support
(20/22) installing python-resolvelib [################################] 100%
(21/22) installing ansible-core [################################] 100%
Optional dependencies for ansible-core
sshpass: for ssh connections with password
python-passlib: crypt values for vars_prompt
python-netaddr: for the ipaddr filter
python-systemd: log to journal
python-pywinrm: connect to Windows machines
python-dnspython: for dig lookup
python-jmespath: json_query support
(22/22) installing ansible [################################] 100%
Optional dependencies for ansible
python-argcomplete: shell completions
python-pyopenssl: openssl modules
python-dnspython: for dig lookup
python-ovirt-engine-sdk: ovirt support
python-boto3: aws_s3 module
python-ldap: ldap support
python-proxmoxer: proxmos modules
python-openstacksdk: OpenStack module
python-pynetbox: NetBox module
python-ldap: LDAP modules
python-keyring: Keyring module
acme-tiny: openssl_certificate module
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
[[email protected] Linux devops]# pacman -Si ansible
Repository : community
Name : ansible
Version : 5.0.0-1
Description : Official assortment of Ansible collections
Architecture : any
URL : https://pypi.org/project/ansible/
Licenses : GPL3
Groups : None
Provides : python-ansible_collections
Depends On : python ansible-core
Optional Deps : python-argcomplete: shell completions
python-pyopenssl: openssl modules
python-dnspython: for dig lookup
python-ovirt-engine-sdk: ovirt support
python-boto3: aws_s3 module
python-ldap: ldap support
python-proxmoxer: proxmos modules
python-openstacksdk: OpenStack module
python-pynetbox: NetBox module
python-ldap: LDAP modules
python-keyring: Keyring module
acme-tiny: openssl_certificate module
Conflicts With : None
Replaces : None
Download Size : 33.18 MiB
Installed Size : 446.93 MiB
Packager : Sven-Hendrik Haase <[email protected]>
Build Date : Wed 01 Dec 2021 10:43:25 AM UTC
Validated By : MD5 Sum SHA-256 Sum Signature
[[email protected] Linux devops]# ansible --version
ansible [core 2.12.0]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.9/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.9.9 (main, Nov 20 2021, 21:30:06) [GCC 11.1.0]
jinja version = 3.0.3
libyaml = True
[[email protected] Linux devops]# pacman -Q | grep ansible
ansible 5.0.0-1
ansible-core 2.12.0-1
[[email protected] Linux devops]#
Recap
Now you know how to install the latest version of Ansible in Arch Linux using the Community repository. Subscribe to the YouTube channel, Medium, Website, Twitter, and Substack to not miss the next episode of the Ansible Pilot.
Academy
Learn the Ansible automation technology with some real-life examples in my
My book Ansible By Examples: 200+ Automation Examples For Linux and Windows System Administrator and DevOps
Donate
Want to keep this project going? Please donate