{"id":23356,"date":"2023-12-31T19:14:41","date_gmt":"2023-12-31T19:14:41","guid":{"rendered":"https:\/\/linuxways.net\/?p=23356"},"modified":"2023-12-31T19:15:48","modified_gmt":"2023-12-31T19:15:48","slug":"install-configure-ansible-on-debian-12","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/debian\/install-configure-ansible-on-debian-12\/","title":{"rendered":"How to Install and Configure Ansible on Debian 12"},"content":{"rendered":"<p>Ansible is a Python-based application that provides the facility to run similar tasks on multiple systems through one primary system. This removes the hassle of configuring each system manually as the user can just write down the task to be performed by the systems in a playbook. Ansible is an open-source software that can be used in app development, system integration, or for carrying out routine work when it comes to network management. On Debian 12 Ansible can be installed in two ways yet to function properly it is to be configured properly.<\/p>\n<h3><strong>Outline: <\/strong><\/h3>\n<ul>\n<li><a href=\"#post-23356-566mk59kfgn5\"><strong>How to Install Ansible in Debian 12<\/strong><\/a><\/li>\n<li><a href=\"#post-23356-gv6nvh9erlz6\"><strong>Through Apt<\/strong><\/a><\/li>\n<li><a href=\"#post-23356-de7ad2cqam30\"><strong>Through Pipx<\/strong><\/a><\/li>\n<li><a href=\"#post-23356-2kx696u3c3u3\"><strong>Configuring Ansible on Debian 12<\/strong><\/a><\/li>\n<li><a href=\"#post-23356-qk5cg3tqegwu\"><strong>Removing Ansible from Debian 12<\/strong><\/a><\/li>\n<li><a href=\"#post-23356-xalkuhxm4t02\"><strong>Conclusion <\/strong><\/a><\/li>\n<\/ul>\n<h2><a id=\"post-23356-566mk59kfgn5\"><\/a><strong>How to Install Ansible in Debian 12<\/strong><\/h2>\n<p>Ansible usually uses the secure shell for interacting remotely with the systems and sends instructions in the form of modules. Using these modules the systems perform the desired tasks or get into the desired state, to install Ansible on Debian 12 there are two ways:<\/p>\n<h2><a id=\"post-23356-gv6nvh9erlz6\"><\/a><strong>Method 1: Through the Advance Packaging Tool <\/strong><\/h2>\n<p>One of the easiest ways to install any package or application on Debian 12 is by using its default package manager tool so in the case of Ansible execute:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt <span class=\"kw2\">install<\/span> ansible <span class=\"re5\">-y<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"797\" height=\"277\" class=\"wp-image-23361\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-1.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-1.png 797w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-1-300x104.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-1-768x267.png 768w\" sizes=\"auto, (max-width: 797px) 100vw, 797px\" \/><\/p>\n<p>After successfully installing this automation application, then verify its version and for that:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">ansible <span class=\"re5\">--version<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"797\" height=\"383\" class=\"wp-image-23364\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-2.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-2.png 797w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-2-300x144.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-2-768x369.png 768w\" sizes=\"auto, (max-width: 797px) 100vw, 797px\" \/><\/p>\n<h2><a id=\"post-23356-de7ad2cqam30\"><\/a><strong>Method 2: Through Pipx<\/strong><\/h2>\n<p>Since Ansible is a Python-based tool it can be installed through pipx which is a package manager for installing non-Debian Python command-line applications. So, to install Ansible on Debian through pipx it needs to be installed first and for that run:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt <span class=\"kw2\">install<\/span> pipx <span class=\"re5\">-y<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"785\" height=\"261\" class=\"wp-image-23369\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-3.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-3.png 785w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-3-300x100.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-3-768x255.png 768w\" sizes=\"auto, (max-width: 785px) 100vw, 785px\" \/><\/p>\n<p>After successful installation of pipx verify its version by executing:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">pipx <span class=\"re5\">--version<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"779\" height=\"212\" class=\"wp-image-23374\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-4.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-4.png 779w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-4-300x82.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-4-768x209.png 768w\" sizes=\"auto, (max-width: 779px) 100vw, 779px\" \/><\/p>\n<p>There are two types of installation for Ansible one is minimal which means that it has all the basic features whereas the other type has all the options starting from the basic level to advanced. To install the advanced level Ansible with full options execute the:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">pipx <span class=\"kw2\">install<\/span> <span class=\"re5\">--include-deps<\/span> ansible<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"784\" height=\"299\" class=\"wp-image-23384\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-5.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-5.png 784w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-5-300x114.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-5-768x293.png 768w\" sizes=\"auto, (max-width: 784px) 100vw, 784px\" \/><\/p>\n<p>You might get a warning note once upon the successful installation of Ansible on Debian 12 stating that this application cannot be accessible globally.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"772\" height=\"213\" class=\"wp-image-23392\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-6.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-6.png 772w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-6-300x83.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-6-768x212.png 768w\" sizes=\"auto, (max-width: 772px) 100vw, 772px\" \/><\/p>\n<p>This is because the path of the environmental variable doesn\u2019t include the directory in which you have installed Ansible, so to fix this issue of accessibility execute:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">pipx ensurepath<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"785\" height=\"303\" class=\"wp-image-23398\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-7.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-7.png 785w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-7-300x116.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-7-768x296.png 768w\" sizes=\"auto, (max-width: 785px) 100vw, 785px\" \/><\/p>\n<p>Once you are done with the path correction, a system reboot is required to make effect the changes. Keeping the application updated keeps them functioning smoothly so in case there is a new update for Ansible then just execute:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">pipx upgrade <span class=\"re5\">--include-injected<\/span> ansible<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"773\" height=\"201\" class=\"wp-image-23407\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-8.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-8.png 773w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-8-300x78.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-8-768x200.png 768w\" sizes=\"auto, (max-width: 773px) 100vw, 773px\" \/><\/p>\n<p>If you have trouble with using the currently installed version of Ansible and want to install the basic setup of Ansible with a specific version then run:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">pipx <span class=\"kw2\">install<\/span> ansible-core==<span class=\"nu0\">2.12<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"783\" height=\"410\" class=\"wp-image-23416\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-9.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-9.png 783w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-9-300x157.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-9-768x402.png 768w\" sizes=\"auto, (max-width: 783px) 100vw, 783px\" \/><\/p>\n<p><strong>Note: <\/strong>You might be wondering since Ansible is based on Python language why it cannot be installed through the pip command. The answer to that is no, and this is because in Debian 12 there is a new feature that prevents pip from installing any applications in the Python environment because it causes issues with the Debian package manager, which can lead to system stability issues. This issue can be resolved by creating a virtual environment as it isolates the Python projects resulting in no conflict with the Debian package managing tool.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"806\" height=\"580\" class=\"wp-image-23429\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-10.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-10.png 806w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-10-300x216.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-10-768x553.png 768w\" sizes=\"auto, (max-width: 806px) 100vw, 806px\" \/><\/p>\n<h2><a id=\"post-23356-2kx696u3c3u3\"><\/a><strong>Configuring Ansible on Debian 12<\/strong><\/h2>\n<p>Once you have successfully installed Ansible on Debian 12 there are still some configurations required to make it work and here are some steps for it:<\/p>\n<h3><strong>Step 1: Install SSH<\/strong><\/h3>\n<p>As mentioned above Ansible uses SSH to access the systems remotely so on Debian 12 the OpenSSH server should be installed first and for that execute:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt <span class=\"kw2\">install<\/span> openssh-server <span class=\"re5\">-y<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"785\" height=\"258\" class=\"wp-image-23441\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-11.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-11.png 785w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-11-300x99.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-11-768x252.png 768w\" sizes=\"auto, (max-width: 785px) 100vw, 785px\" \/><\/p>\n<p>Once the secure shell is installed, check if the service is active and running using the systemctl command like this:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> systemctl status sshd<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"785\" height=\"451\" class=\"wp-image-23452\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-12.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-12.png 785w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-12-300x172.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-12-768x441.png 768w\" sizes=\"auto, (max-width: 785px) 100vw, 785px\" \/><\/p>\n<p>If in any case the SSH service is not running or active then start and enable the service by using the below commands:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> systemctl start sshd<br \/>\n<br \/>\n<span class=\"kw2\">sudo<\/span> systemctl <span class=\"kw3\">enable<\/span> sshd<\/div><\/div>\n<h3><strong>Step 2: Create an Ansible User <\/strong><\/h3>\n<p>Now to run the commands and tasks on remote hosts through Ansible on Debian 12 a new separate Ansible user should created and for that run:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> adduser anisble<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"793\" height=\"489\" class=\"wp-image-23464\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-13.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-13.png 793w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-13-300x185.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-13-768x474.png 768w\" sizes=\"auto, (max-width: 793px) 100vw, 793px\" \/><\/p>\n<p>Now to allow the ansible user to have administrator permissions while executing the commands without providing the password allow the password exemption by editing the sudoers file. This is required because the system itself executes the commands and it might need administrator permission sometimes:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw3\">echo<\/span> <span class=\"st0\">&quot;ansible ALL=(ALL) NOPASSWD:ALL&quot;<\/span> <span class=\"sy0\">|<\/span> <span class=\"kw2\">sudo<\/span> <span class=\"kw2\">tee<\/span> <span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>sudoers.d<span class=\"sy0\">\/<\/span>ansible<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"775\" height=\"201\" class=\"wp-image-23468\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-14.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-14.png 775w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-14-300x78.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-14-768x199.png 768w\" sizes=\"auto, (max-width: 775px) 100vw, 775px\" \/><\/p>\n<h3><strong>Step 3: Generate and Copy the SSH Key <\/strong><\/h3>\n<p>To make the secure shell more protected from any malware or hacks it requires a key that makes the connection between the host and the remote system successful. This key has two parts one is the public key which is shared with the remote system and the other is the private key which is saved in the host system. So, the Ansible user can use its private key to connect to the remote system, to generate the ssh key execute:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">ssh-keygen<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"780\" height=\"535\" class=\"wp-image-23473\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-15.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-15.png 780w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-15-300x206.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-15-768x527.png 768w\" sizes=\"auto, (max-width: 780px) 100vw, 780px\" \/><\/p>\n<p>When generating the SSH key the system will ask about the password, and the save directory so simply press enter to move forward with the process. Once the key is generated, save the public part of the key to the host address by stating its IP address:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">ssh-copy-id ansible<span class=\"sy0\">@&lt;<\/span>host-address<span class=\"sy0\">&gt;<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"425\" class=\"wp-image-23479\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-16.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-16.png 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-16-300x166.png 300w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/p>\n<h3><strong>Step 3: Add Hosts <\/strong><\/h3>\n<p>Now you can create a file named hosts and save their IP addresses in it, here for illustration I have two dummy IP addresses:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">nano<\/span> hosts<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"777\" height=\"174\" class=\"wp-image-23483\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-17.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-17.png 777w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-17-300x67.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-17-768x172.png 768w\" sizes=\"auto, (max-width: 777px) 100vw, 777px\" \/><\/p>\n<h3><strong>Step 4: Test the Configuration <\/strong><\/h3>\n<p>Once you have saved the IP addresses of the hosts, use the ping command along with executing the host file to see if the connection is established successfully.<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">ansible all <span class=\"re5\">-i<\/span> .<span class=\"sy0\">\/<\/span>hosts <span class=\"re5\">-u<\/span> ansible <span class=\"re5\">-m<\/span> <span class=\"kw2\">ping<\/span><\/div><\/div>\n<p>Here I have only one host, so only one IP address is displayed, with a success message and if the status is not successful it means that the connection is not established successfully:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"771\" height=\"273\" class=\"wp-image-23488\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-18.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-18.png 771w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-18-300x106.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-18-768x272.png 768w\" sizes=\"auto, (max-width: 771px) 100vw, 771px\" \/><\/p>\n<p>If you are new to using Ansible then to get familiar with the commands used for operating Ansible consult its help by executing:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">ansible <span class=\"re5\">--help<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"783\" height=\"284\" class=\"wp-image-23492\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-19.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-19.png 783w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-19-300x109.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-19-768x279.png 768w\" sizes=\"auto, (max-width: 783px) 100vw, 783px\" \/><\/p>\n<h2><a id=\"post-23356-qk5cg3tqegwu\"><\/a><strong>Removing Ansible From Debian 12 <\/strong><\/h2>\n<p>If you plan to remove Ansible from Debian 12 that was installed through the advanced packaging tool then execute the:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt remove <span class=\"re5\">--autoremove<\/span> anisble <span class=\"re5\">-y<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"794\" height=\"294\" class=\"wp-image-23495\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-20.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-20.png 794w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-20-300x111.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-20-768x284.png 768w\" sizes=\"auto, (max-width: 794px) 100vw, 794px\" \/><\/p>\n<p>If you plan to remove Ansible from Debian 12 that was installed through pipx then in that case, just run:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">pipx uninstall anisble<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"788\" height=\"180\" class=\"wp-image-23498\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-21.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-21.png 788w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-21-300x69.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-21-768x175.png 768w\" sizes=\"auto, (max-width: 788px) 100vw, 788px\" \/><\/p>\n<p>The ansible-core is the base-level setup of Ansible so if you want to remove it from Debian 12 then execute:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">pipx uninstall anisble-core<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"770\" height=\"182\" class=\"wp-image-23500\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-22.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-22.png 770w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-22-300x71.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/12\/word-image-23356-22-768x182.png 768w\" sizes=\"auto, (max-width: 770px) 100vw, 770px\" \/><\/p>\n<h2><a id=\"post-23356-xalkuhxm4t02\"><\/a><strong>Conclusion<\/strong><\/h2>\n<p>To install Ansible on Debian 12 there are two ways one is by using the advanced packaging tool and the other is by using the pipx tool which is a replacement for pip command. To make Ansible function smoothly on Debian it is required to be configured which includes creating an Ansible user having sudo privileges with password exemption and an SSH key to establish a remote connection.<\/p>\n<p>&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>To install Ansible on Debian 12 there are two ways one is by using the advanced packaging tool and the other is by using the pipx tool.<\/p>","protected":false},"author":110,"featured_media":23542,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-23356","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-debian"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/23356","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/110"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=23356"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/23356\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/23542"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=23356"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=23356"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=23356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}