{"id":1412,"date":"2025-08-01T10:00:50","date_gmt":"2025-08-01T10:00:50","guid":{"rendered":"https:\/\/www.xopsschool.com\/tutorials\/?p=1412"},"modified":"2025-08-01T10:00:52","modified_gmt":"2025-08-01T10:00:52","slug":"ansible-command-line-tools-with-example-in-ansible","status":"publish","type":"post","link":"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/","title":{"rendered":"Ansible: Command line tools with example in Ansible"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/encrypted-tbn0.gstatic.com\/images?q=tbn:ANd9GcQ8hSB7mA_j86J8oEQZqYBo1_WLzcBJ5FomcA&amp;s\" alt=\"\" style=\"width:692px;height:auto\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">1. ansible<\/h3>\n\n\n\n<p>The <code>ansible<\/code> command runs ad-hoc tasks (single modules) against hosts in the inventory.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Command Name<\/strong><\/th><th><strong>Description<\/strong><\/th><th><strong>Example<\/strong><\/th><\/tr><\/thead><tbody><tr><td><code>ansible &lt;host-pattern&gt; -m ping<\/code><\/td><td>Ping all hosts to check connectivity.<\/td><td><code>ansible all -m ping<\/code><\/td><\/tr><tr><td><code>ansible &lt;host-pattern&gt; -m shell -a \"&lt;command&gt;\"<\/code><\/td><td>Run a shell command with shell features (pipes, redirects).<\/td><td><code>ansible webservers -m shell -a \"uptime\"<\/code><\/td><\/tr><tr><td><code>ansible &lt;host-pattern&gt; -m command -a \"&lt;command&gt;\"<\/code><\/td><td>Run a command without shell features.<\/td><td><code>ansible dbservers -m command -a \"df -h\"<\/code><\/td><\/tr><tr><td><code>ansible &lt;host-pattern&gt; -m setup<\/code><\/td><td>Gather facts about hosts.<\/td><td><code>ansible localhost -m setup<\/code><\/td><\/tr><tr><td><code>ansible &lt;host-pattern&gt; -m user -a \"&lt;args&gt;\"<\/code><\/td><td>Manage user accounts (create, delete, modify).<\/td><td><code>ansible all -m user -a \"name=john state=present\"<\/code><\/td><\/tr><tr><td><code>ansible &lt;host-pattern&gt; -m copy -a \"&lt;args&gt;\"<\/code><\/td><td>Copy files to remote hosts.<\/td><td><code>ansible all -m copy -a \"src=foo.conf dest=\/etc\/foo.conf\"<\/code><\/td><\/tr><tr><td><code>ansible &lt;host-pattern&gt; -m yum -a \"&lt;args&gt;\"<\/code><\/td><td>Install packages using yum.<\/td><td><code>ansible all -m yum -a \"name=httpd state=latest\"<\/code><\/td><\/tr><tr><td><code>ansible &lt;host-pattern&gt; -m service -a \"&lt;args&gt;\"<\/code><\/td><td>Manage services (start, stop, restart).<\/td><td><code>ansible all -m service -a \"name=httpd state=restarted\"<\/code><\/td><\/tr><tr><td><code>ansible &lt;host-pattern&gt; -m file -a \"&lt;args&gt;\"<\/code><\/td><td>Manage files and directories (create, delete, set permissions).<\/td><td><code>ansible all -m file -a \"path=\/tmp\/testfile state=touch\"<\/code><\/td><\/tr><tr><td><code>ansible &lt;host-pattern&gt; -m get_url -a \"&lt;args&gt;\"<\/code><\/td><td>Download files from a URL.<\/td><td><code>ansible all -m get_url -a \"url=https:\/\/example.com\/file.tar.gz dest=\/tmp\/file.tar.gz\"<\/code><\/td><\/tr><tr><td><code>ansible &lt;host-pattern&gt; -m debug -a \"&lt;args&gt;\"<\/code><\/td><td>Print debug messages.<\/td><td><code>ansible all -m debug -a \"msg='Hello World'\"<\/code><\/td><\/tr><tr><td><code>ansible &lt;host-pattern&gt; -a \"&lt;command&gt;\"<\/code><\/td><td>Run a shell command (default to shell module if <code>-m<\/code> omitted).<\/td><td><code>ansible all -a \"uname -a\"<\/code><\/td><\/tr><tr><td><code>ansible &lt;host-pattern&gt; -b -m &lt;module&gt; -a \"&lt;args&gt;\"<\/code><\/td><td>Run with privilege escalation (sudo).<\/td><td><code>ansible all -b -m apt -a \"name=nginx state=present\"<\/code><\/td><\/tr><tr><td><code>ansible &lt;host-pattern&gt; -u &lt;user&gt; -m &lt;module&gt;<\/code><\/td><td>Run as a specific user.<\/td><td><code>ansible all -u admin -m ping<\/code><\/td><\/tr><tr><td><code>ansible &lt;host-pattern&gt; --list-hosts<\/code><\/td><td>List hosts matching the pattern.<\/td><td><code>ansible all --list-hosts<\/code><\/td><\/tr><tr><td><code>ansible &lt;host-pattern&gt; --limit &lt;subset&gt; -m &lt;module&gt;<\/code><\/td><td>Limit execution to a subset of hosts.<\/td><td><code>ansible all --limit dbservers -m ping<\/code><\/td><\/tr><tr><td><code>ansible &lt;host-pattern&gt; --check -m &lt;module&gt; -a \"&lt;args&gt;\"<\/code><\/td><td>Run in dry-run mode (check changes without applying).<\/td><td><code>ansible all --check -m yum -a \"name=git state=present\"<\/code><\/td><\/tr><tr><td><code>ansible &lt;host-pattern&gt; -m &lt;module&gt; -a \"&lt;args&gt;\" -v<\/code><\/td><td>Run with verbose output (add <code>-vv<\/code> or <code>-vvv<\/code> for more).<\/td><td><code>ansible all -m command -a \"ls -l \/tmp\" -v<\/code><\/td><\/tr><tr><td><code>ansible &lt;host-pattern&gt; -m raw -a \"&lt;command&gt;\"<\/code><\/td><td>Run raw commands (no Python required on remote).<\/td><td><code>ansible all -m raw -a \"uptime\"<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">2. ansible-playbook<\/h3>\n\n\n\n<p>The <code>ansible-playbook<\/code> command runs complex, multi-step playbooks written in YAML.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Command Name<\/strong><\/th><th><strong>Description<\/strong><\/th><th><strong>Example<\/strong><\/th><\/tr><\/thead><tbody><tr><td><code>ansible-playbook &lt;playbook.yml&gt;<\/code><\/td><td>Run a playbook.<\/td><td><code>ansible-playbook site.yml<\/code><\/td><\/tr><tr><td><code>ansible-playbook -i &lt;inventory&gt; &lt;playbook.yml&gt;<\/code><\/td><td>Specify a custom inventory file.<\/td><td><code>ansible-playbook -i inventory.yml site.yml<\/code><\/td><\/tr><tr><td><code>ansible-playbook -l &lt;host-group&gt; &lt;playbook.yml&gt;<\/code><\/td><td>Limit execution to a specific host group.<\/td><td><code>ansible-playbook -l webservers site.yml<\/code><\/td><\/tr><tr><td><code>ansible-playbook -u &lt;user&gt; &lt;playbook.yml&gt;<\/code><\/td><td>Run as a specific user.<\/td><td><code>ansible-playbook -u deployer site.yml<\/code><\/td><\/tr><tr><td><code>ansible-playbook -b &lt;playbook.yml&gt;<\/code><\/td><td>Run with privilege escalation (sudo).<\/td><td><code>ansible-playbook -b site.yml<\/code><\/td><\/tr><tr><td><code>ansible-playbook -k &lt;playbook.yml&gt;<\/code><\/td><td>Prompt for SSH password.<\/td><td><code>ansible-playbook -k site.yml<\/code><\/td><\/tr><tr><td><code>ansible-playbook -K &lt;playbook.yml&gt;<\/code><\/td><td>Prompt for privilege escalation password.<\/td><td><code>ansible-playbook -K site.yml<\/code><\/td><\/tr><tr><td><code>ansible-playbook --check &lt;playbook.yml&gt;<\/code><\/td><td>Run in dry-run mode.<\/td><td><code>ansible-playbook --check site.yml<\/code><\/td><\/tr><tr><td><code>ansible-playbook --diff &lt;playbook.yml&gt;<\/code><\/td><td>Show differences when files are modified.<\/td><td><code>ansible-playbook --diff site.yml<\/code><\/td><\/tr><tr><td><code>ansible-playbook --start-at-task=\"&lt;task-name&gt;\" &lt;playbook.yml&gt;<\/code><\/td><td>Start execution at a specific task.<\/td><td><code>ansible-playbook --start-at-task=\"Install packages\" site.yml<\/code><\/td><\/tr><tr><td><code>ansible-playbook -e &lt;var=value&gt; &lt;playbook.yml&gt;<\/code><\/td><td>Set extra variables.<\/td><td><code>ansible-playbook -e var=value site.yml<\/code><\/td><\/tr><tr><td><code>ansible-playbook -e @&lt;vars-file&gt; &lt;playbook.yml&gt;<\/code><\/td><td>Load extra variables from a YAML file.<\/td><td><code>ansible-playbook -e @vars.yml site.yml<\/code><\/td><\/tr><tr><td><code>ansible-playbook --tags \"&lt;tag1,tag2&gt;\" &lt;playbook.yml&gt;<\/code><\/td><td>Run tasks with specific tags.<\/td><td><code>ansible-playbook --tags \"setup,install\" site.yml<\/code><\/td><\/tr><tr><td><code>ansible-playbook --skip-tags \"&lt;tag&gt;\" &lt;playbook.yml&gt;<\/code><\/td><td>Skip tasks with specific tags.<\/td><td><code>ansible-playbook --skip-tags \"test\" site.yml<\/code><\/td><\/tr><tr><td><code>ansible-playbook --step &lt;playbook.yml&gt;<\/code><\/td><td>Run tasks interactively, prompting for each.<\/td><td><code>ansible-playbook --step site.yml<\/code><\/td><\/tr><tr><td><code>ansible-playbook -v &lt;playbook.yml&gt;<\/code><\/td><td>Run in verbose mode (add <code>-vv<\/code> or <code>-vvv<\/code> for more).<\/td><td><code>ansible-playbook -v site.yml<\/code><\/td><\/tr><tr><td><code>ansible-playbook --syntax-check &lt;playbook.yml&gt;<\/code><\/td><td>Check playbook syntax without execution.<\/td><td><code>ansible-playbook --syntax-check site.yml<\/code><\/td><\/tr><tr><td><code>ansible-playbook --list-hosts &lt;playbook.yml&gt;<\/code><\/td><td>List hosts targeted by the playbook.<\/td><td><code>ansible-playbook --list-hosts site.yml<\/code><\/td><\/tr><tr><td><code>ansible-playbook --list-tasks &lt;playbook.yml&gt;<\/code><\/td><td>List all tasks in the playbook.<\/td><td><code>ansible-playbook --list-tasks site.yml<\/code><\/td><\/tr><tr><td><code>ansible-playbook --list-tags &lt;playbook.yml&gt;<\/code><\/td><td>List all tags in the playbook.<\/td><td><code>ansible-playbook --list-tags site.yml<\/code><\/td><\/tr><tr><td><code>ansible-playbook --flush-cache &lt;playbook.yml&gt;<\/code><\/td><td>Clear fact cache before running.<\/td><td><code>ansible-playbook --flush-cache site.yml<\/code><\/td><\/tr><tr><td><code>ansible-playbook --forks &lt;number&gt; &lt;playbook.yml&gt;<\/code><\/td><td>Set number of parallel processes.<\/td><td><code>ansible-playbook --forks 20 site.yml<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">3. ansible-galaxy<\/h3>\n\n\n\n<p>The <code>ansible-galaxy<\/code> command manages roles and collections (install, create, list, remove).<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Command Name<\/strong><\/th><th><strong>Description<\/strong><\/th><th><strong>Example<\/strong><\/th><\/tr><\/thead><tbody><tr><td><code>ansible-galaxy install &lt;role&gt;<\/code><\/td><td>Install a role from Ansible Galaxy.<\/td><td><code>ansible-galaxy install geerlingguy.nginx<\/code><\/td><\/tr><tr><td><code>ansible-galaxy install -r &lt;requirements-file&gt;<\/code><\/td><td>Install multiple roles from a requirements file.<\/td><td><code>ansible-galaxy install -r requirements.yml<\/code><\/td><\/tr><tr><td><code>ansible-galaxy list<\/code><\/td><td>List installed roles.<\/td><td><code>ansible-galaxy list<\/code><\/td><\/tr><tr><td><code>ansible-galaxy remove &lt;role&gt;<\/code><\/td><td>Remove an installed role.<\/td><td><code>ansible-galaxy remove geerlingguy.nginx<\/code><\/td><\/tr><tr><td><code>ansible-galaxy init &lt;role-name&gt;<\/code><\/td><td>Scaffold a new role.<\/td><td><code>ansible-galaxy init myrole<\/code><\/td><\/tr><tr><td><code>ansible-galaxy collection install &lt;collection&gt;<\/code><\/td><td>Install a collection from Ansible Galaxy.<\/td><td><code>ansible-galaxy collection install community.general<\/code><\/td><\/tr><tr><td><code>ansible-galaxy collection install -r &lt;requirements-file&gt;<\/code><\/td><td>Install collections from a requirements file.<\/td><td><code>ansible-galaxy collection install -r collections\/requirements.yml<\/code><\/td><\/tr><tr><td><code>ansible-galaxy collection list<\/code><\/td><td>List installed collections.<\/td><td><code>ansible-galaxy collection list<\/code><\/td><\/tr><tr><td><code>ansible-galaxy collection init &lt;namespace.collection&gt;<\/code><\/td><td>Scaffold a new collection.<\/td><td><code>ansible-galaxy collection init my_namespace.my_collection<\/code><\/td><\/tr><tr><td><code>ansible-galaxy role search &lt;keyword&gt;<\/code><\/td><td>Search roles by keyword.<\/td><td><code>ansible-galaxy role search nginx<\/code><\/td><\/tr><tr><td><code>ansible-galaxy collection search &lt;keyword&gt;<\/code><\/td><td>Search collections by keyword.<\/td><td><code>ansible-galaxy collection search kubernetes<\/code><\/td><\/tr><tr><td><code>ansible-galaxy role info &lt;role&gt;<\/code><\/td><td>Show details for a specific role.<\/td><td><code>ansible-galaxy role info geerlingguy.nginx<\/code><\/td><\/tr><tr><td><code>ansible-galaxy collection info &lt;collection&gt;<\/code><\/td><td>Show details for a specific collection.<\/td><td><code>ansible-galaxy collection info community.general<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">4. ansible-vault<\/h3>\n\n\n\n<p>The <code>ansible-vault<\/code> command encrypts, decrypts, and manages sensitive data.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Command Name<\/strong><\/th><th><strong>Description<\/strong><\/th><th><strong>Example<\/strong><\/th><\/tr><\/thead><tbody><tr><td><code>ansible-vault create &lt;file&gt;<\/code><\/td><td>Create a new encrypted file.<\/td><td><code>ansible-vault create secrets.yml<\/code><\/td><\/tr><tr><td><code>ansible-vault edit &lt;file&gt;<\/code><\/td><td>Edit an encrypted file in-place.<\/td><td><code>ansible-vault edit secrets.yml<\/code><\/td><\/tr><tr><td><code>ansible-vault view &lt;file&gt;<\/code><\/td><td>View contents of an encrypted file.<\/td><td><code>ansible-vault view secrets.yml<\/code><\/td><\/tr><tr><td><code>ansible-vault encrypt &lt;file&gt;<\/code><\/td><td>Encrypt a plaintext file.<\/td><td><code>ansible-vault encrypt file.yml<\/code><\/td><\/tr><tr><td><code>ansible-vault decrypt &lt;file&gt;<\/code><\/td><td>Decrypt an encrypted file to plaintext.<\/td><td><code>ansible-vault decrypt secrets.yml<\/code><\/td><\/tr><tr><td><code>ansible-vault rekey &lt;file&gt;<\/code><\/td><td>Change the password of an encrypted file.<\/td><td><code>ansible-vault rekey secrets.yml<\/code><\/td><\/tr><tr><td><code>ansible-vault encrypt_string '&lt;string&gt;' --name '&lt;var-name&gt;'<\/code><\/td><td>Encrypt a string for use in playbooks.<\/td><td><code>ansible-vault encrypt_string 'supersecret' --name 'my_secret'<\/code><\/td><\/tr><tr><td><code>ansible-vault encrypt --vault-password-file &lt;file&gt; &lt;file&gt;<\/code><\/td><td>Encrypt a file using a password file.<\/td><td><code>ansible-vault encrypt --vault-password-file ~\/.vault_pass.txt secrets.yml<\/code><\/td><\/tr><tr><td><code>ansible-vault decrypt --vault-password-file &lt;file&gt; &lt;file&gt;<\/code><\/td><td>Decrypt a file using a password file.<\/td><td><code>ansible-vault decrypt --vault-password-file ~\/.vault_pass.txt secrets.yml<\/code><\/td><\/tr><tr><td><code>ansible-playbook --ask-vault-pass &lt;playbook.yml&gt;<\/code><\/td><td>Prompt for vault password during playbook execution.<\/td><td><code>ansible-playbook --ask-vault-pass site.yml<\/code><\/td><\/tr><tr><td><code>ansible-playbook --vault-password-file &lt;file&gt; &lt;playbook.yml&gt;<\/code><\/td><td>Use a password file for vault during playbook execution.<\/td><td><code>ansible-playbook --vault-password-file ~\/.vault_pass.txt site.yml<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">5. ansible-doc<\/h3>\n\n\n\n<p>The <code>ansible-doc<\/code> command displays documentation for modules and plugins.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Command Name<\/strong><\/th><th><strong>Description<\/strong><\/th><th><strong>Example<\/strong><\/th><\/tr><\/thead><tbody><tr><td><code>ansible-doc &lt;module-name&gt;<\/code><\/td><td>Show documentation for a specific module.<\/td><td><code>ansible-doc ping<\/code><\/td><\/tr><tr><td><code>ansible-doc -l<\/code><\/td><td>List all available modules.<\/td><td><code>ansible-doc -l<\/code><\/td><\/tr><tr><td><code>ansible-doc -s &lt;module-name&gt;<\/code><\/td><td>Show minimal argument specification for a module.<\/td><td><code>ansible-doc -s file<\/code><\/td><\/tr><tr><td><code>ansible-doc -M &lt;path&gt; &lt;module-name&gt;<\/code><\/td><td>Show documentation for a module in a custom library directory.<\/td><td><code>ansible-doc -M .\/library custom_module<\/code><\/td><\/tr><tr><td><code>ansible-doc -t lookup &lt;plugin-name&gt;<\/code><\/td><td>Show documentation for a lookup plugin.<\/td><td><code>ansible-doc -t lookup file<\/code><\/td><\/tr><tr><td><code>ansible-doc --playbook-dir=&lt;path&gt;<\/code><\/td><td>Specify playbook directory context for documentation.<\/td><td><code>ansible-doc --playbook-dir=.\/roles\/<\/code><\/td><\/tr><tr><td><code>ansible-doc --json<\/code><\/td><td>Output module documentation in JSON format.<\/td><td><code>ansible-doc --json<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">6. ansible-inventory<\/h3>\n\n\n\n<p>The <code>ansible-inventory<\/code> command manages and displays inventory information.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Command Name<\/strong><\/th><th><strong>Description<\/strong><\/th><th><strong>Example<\/strong><\/th><\/tr><\/thead><tbody><tr><td><code>ansible-inventory --list<\/code><\/td><td>List all hosts and groups in JSON format.<\/td><td><code>ansible-inventory --list<\/code><\/td><\/tr><tr><td><code>ansible-inventory --graph<\/code><\/td><td>Display inventory as a graph.<\/td><td><code>ansible-inventory --graph<\/code><\/td><\/tr><tr><td><code>ansible-inventory --host &lt;hostname&gt;<\/code><\/td><td>Show variables for a specific host.<\/td><td><code>ansible-inventory --host webserver1<\/code><\/td><\/tr><tr><td><code>ansible-inventory -i &lt;inventory-file&gt; --list<\/code><\/td><td>List inventory from a specific file.<\/td><td><code>ansible-inventory -i hosts.ini --list<\/code><\/td><\/tr><tr><td><code>ansible-inventory -i &lt;inventory-file&gt; --graph<\/code><\/td><td>Display graph from a specific inventory file.<\/td><td><code>ansible-inventory -i inventory.yml --graph<\/code><\/td><\/tr><tr><td><code>ansible-inventory -i &lt;dynamic-inventory&gt; --list<\/code><\/td><td>List inventory from a dynamic source.<\/td><td><code>ansible-inventory -i aws_ec2.yaml --list<\/code><\/td><\/tr><tr><td><code>ansible-inventory --yaml<\/code><\/td><td>Output inventory in YAML format.<\/td><td><code>ansible-inventory --yaml<\/code><\/td><\/tr><tr><td><code>ansible-inventory --vars<\/code><\/td><td>Include variables in the output.<\/td><td><code>ansible-inventory --vars<\/code><\/td><\/tr><tr><td><code>ansible-inventory --export<\/code><\/td><td>Export inventory for external use.<\/td><td><code>ansible-inventory --export<\/code><\/td><\/tr><tr><td><code>ansible-inventory --help<\/code><\/td><td>Show all available options.<\/td><td><code>ansible-inventory --help<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">7. ansible-pull<\/h3>\n\n\n\n<p>The <code>ansible-pull<\/code> command runs playbooks in pull mode (nodes pull from a repository).<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Command Name<\/strong><\/th><th><strong>Description<\/strong><\/th><th><strong>Example<\/strong><\/th><\/tr><\/thead><tbody><tr><td><code>ansible-pull -U &lt;repo-url&gt;<\/code><\/td><td>Pull and run playbook from a git repository.<\/td><td><code>ansible-pull -U https:\/\/github.com\/example\/repo.git<\/code><\/td><\/tr><tr><td><code>ansible-pull -U &lt;repo-url&gt; &lt;playbook.yml&gt;<\/code><\/td><td>Pull and run a specific playbook.<\/td><td><code>ansible-pull -U https:\/\/github.com\/example\/repo.git playbook.yml<\/code><\/td><\/tr><tr><td><code>ansible-pull -U &lt;repo-url&gt; -i &lt;inventory&gt;<\/code><\/td><td>Specify inventory (e.g., localhost).<\/td><td><code>ansible-pull -U https:\/\/github.com\/example\/repo.git -i localhost,<\/code><\/td><\/tr><tr><td><code>ansible-pull -U &lt;repo-url&gt; -d &lt;path&gt;<\/code><\/td><td>Specify checkout directory.<\/td><td><code>ansible-pull -U https:\/\/github.com\/example\/repo.git -d \/tmp\/checkout<\/code><\/td><\/tr><tr><td><code>ansible-pull -U &lt;repo-url&gt; -C &lt;branch&gt;<\/code><\/td><td>Checkout a specific branch.<\/td><td><code>ansible-pull -U https:\/\/github.com\/example\/repo.git -C dev<\/code><\/td><\/tr><tr><td><code>ansible-pull -U &lt;repo-url&gt; -e \"&lt;var=value&gt;\"<\/code><\/td><td>Pass extra variables.<\/td><td><code>ansible-pull -U https:\/\/github.com\/example\/repo.git -e \"var=value\"<\/code><\/td><\/tr><tr><td><code>ansible-pull -U &lt;repo-url&gt; --accept-host-key<\/code><\/td><td>Automatically accept git SSH host keys.<\/td><td><code>ansible-pull -U https:\/\/github.com\/example\/repo.git --accept-host-key<\/code><\/td><\/tr><tr><td><code>ansible-pull -U &lt;repo-url&gt; -v<\/code><\/td><td>Run in verbose mode.<\/td><td><code>ansible-pull -U https:\/\/github.com\/example\/repo.git -v<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">8. ansible-config<\/h3>\n\n\n\n<p>The <code>ansible-config<\/code> command views and manages Ansible configuration settings.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Command Name<\/strong><\/th><th><strong>Description<\/strong><\/th><th><strong>Example<\/strong><\/th><\/tr><\/thead><tbody><tr><td><code>ansible-config view<\/code><\/td><td>Show current configuration settings.<\/td><td><code>ansible-config view<\/code><\/td><\/tr><tr><td><code>ansible-config list<\/code><\/td><td>List all configuration options and their defaults.<\/td><td><code>ansible-config list<\/code><\/td><\/tr><tr><td><code>ansible-config dump<\/code><\/td><td>Dump configuration settings with their sources.<\/td><td><code>ansible-config dump<\/code><\/td><\/tr><tr><td><code>ansible-config init --disabled &gt; ansible.cfg<\/code><\/td><td>Generate a commented <code>ansible.cfg<\/code> template.<\/td><td><code>ansible-config init --disabled &gt; ansible.cfg<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">9. ansible-console<\/h3>\n\n\n\n<p>The <code>ansible-console<\/code> command provides an interactive shell for ad-hoc commands.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Command Name<\/strong><\/th><th><strong>Description<\/strong><\/th><th><strong>Example<\/strong><\/th><\/tr><\/thead><tbody><tr><td><code>ansible-console<\/code><\/td><td>Start interactive console for all hosts.<\/td><td><code>ansible-console<\/code><\/td><\/tr><tr><td><code>ansible-console &lt;host-pattern&gt;<\/code><\/td><td>Limit console to a specific host group.<\/td><td><code>ansible-console webservers<\/code><\/td><\/tr><tr><td><code>ansible-console --inventory &lt;inventory&gt;<\/code><\/td><td>Use a custom inventory file.<\/td><td><code>ansible-console --inventory inventory.yml<\/code><\/td><\/tr><tr><td><code>ansible-console --become<\/code><\/td><td>Run with privilege escalation.<\/td><td><code>ansible-console --become<\/code><\/td><\/tr><tr><td><code>ansible-console &gt; ping<\/code><\/td><td>Run ping module inside console.<\/td><td><code>&gt; ping<\/code><\/td><\/tr><tr><td><code>ansible-console &gt; shell &lt;command&gt;<\/code><\/td><td>Run shell command inside console.<\/td><td><code>&gt; shell uname -a<\/code><\/td><\/tr><tr><td><code>ansible-console &gt; apt &lt;args&gt;<\/code><\/td><td>Run apt module inside console.<\/td><td><code>&gt; apt name=git state=present<\/code><\/td><\/tr><tr><td><code>ansible-console &gt; exit<\/code><\/td><td>Exit the console.<\/td><td><code>&gt; exit<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">10. ansible-connection<\/h3>\n\n\n\n<p>The <code>ansible-connection<\/code> command manages connection plugins (rarely used directly).<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Command Name<\/strong><\/th><th><strong>Description<\/strong><\/th><th><strong>Example<\/strong><\/th><\/tr><\/thead><tbody><tr><td><code>ansible-connection -h<\/code><\/td><td>Show help and available subcommands.<\/td><td><code>ansible-connection -h<\/code><\/td><\/tr><tr><td><code>ansible-connection password<\/code><\/td><td>Show password subcommand (used by connection plugins).<\/td><td><code>ansible-connection password<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">11. Common Ansible Modules<\/h3>\n\n\n\n<p>Below is a table of common Ansible modules with their YAML examples.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Module Name<\/strong><\/th><th><strong>Description<\/strong><\/th><th><strong>Example (YAML)<\/strong><\/th><\/tr><\/thead><tbody><tr><td><code>command<\/code><\/td><td>Run a command without shell features.<\/td><td><code>yaml&lt;br&gt;- name: List directory&lt;br&gt; ansible.builtin.command:&lt;br&gt; cmd: ls -l \/tmp&lt;br&gt;<\/code><\/td><\/tr><tr><td><code>shell<\/code><\/td><td>Run a shell command with pipes\/redirects.<\/td><td><code>yaml&lt;br&gt;- name: Run shell with pipe&lt;br&gt; ansible.builtin.shell: \"cat \/etc\/passwd | grep root\"&lt;br&gt;<\/code><\/td><\/tr><tr><td><code>copy<\/code><\/td><td>Copy files to remote hosts.<\/td><td><code>yaml&lt;br&gt;- name: Copy config file&lt;br&gt; ansible.builtin.copy:&lt;br&gt; src: .\/nginx.conf&lt;br&gt; dest: \/etc\/nginx\/nginx.conf&lt;br&gt;<\/code><\/td><\/tr><tr><td><code>template<\/code><\/td><td>Deploy files from Jinja2 templates.<\/td><td><code>yaml&lt;br&gt;- name: Deploy config from template&lt;br&gt; ansible.builtin.template:&lt;br&gt; src: .\/app.conf.j2&lt;br&gt; dest: \/etc\/myapp\/app.conf&lt;br&gt;<\/code><\/td><\/tr><tr><td><code>file<\/code><\/td><td>Manage files and directories (permissions, state).<\/td><td><code>yaml&lt;br&gt;- name: Set permissions&lt;br&gt; ansible.builtin.file:&lt;br&gt; path: \/opt\/foo&lt;br&gt; state: directory&lt;br&gt; mode: '0755'&lt;br&gt;<\/code><\/td><\/tr><tr><td><code>service<\/code><\/td><td>Manage services (start, stop, restart).<\/td><td><code>yaml&lt;br&gt;- name: Ensure nginx is running&lt;br&gt; ansible.builtin.service:&lt;br&gt; name: nginx&lt;br&gt; state: started&lt;br&gt;<\/code><\/td><\/tr><tr><td><code>user<\/code><\/td><td>Manage user accounts.<\/td><td><code>yaml&lt;br&gt;- name: Add user&lt;br&gt; ansible.builtin.user:&lt;br&gt; name: deploy&lt;br&gt; groups: sudo&lt;br&gt; state: present&lt;br&gt;<\/code><\/td><\/tr><tr><td><code>apt<\/code><\/td><td>Manage packages on Debian-based systems.<\/td><td><code>yaml&lt;br&gt;- name: Install nginx (Debian)&lt;br&gt; ansible.builtin.apt:&lt;br&gt; name: nginx&lt;br&gt; state: latest&lt;br&gt;<\/code><\/td><\/tr><tr><td><code>yum<\/code><\/td><td>Manage packages on RHEL-based systems.<\/td><td><code>yaml&lt;br&gt;- name: Install nginx (RHEL)&lt;br&gt; ansible.builtin.yum:&lt;br&gt; name: nginx&lt;br&gt; state: latest&lt;br&gt;<\/code><\/td><\/tr><tr><td><code>git<\/code><\/td><td>Clone or manage git repositories.<\/td><td><code>yaml&lt;br&gt;- name: Clone a repo&lt;br&gt; ansible.builtin.git:&lt;br&gt; repo: 'https:\/\/github.com\/example\/project.git'&lt;br&gt; dest: \/opt\/app&lt;br&gt;<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. ansible The ansible command runs ad-hoc tasks (single modules) against hosts in the inventory. Command Name Description Example ansible &lt;host-pattern&gt; -m ping Ping all hosts to check connectivity. ansible all -m ping ansible &lt;host-pattern&gt; -m shell -a &#8220;&lt;command&gt;&#8221; Run a shell command with shell features (pipes, redirects). ansible webservers -m shell -a &#8220;uptime&#8221; ansible &#8230; <a title=\"Ansible: Command line tools with example in Ansible\" class=\"read-more\" href=\"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/\" aria-label=\"Read more about Ansible: Command line tools with example in Ansible\">Read more<\/a><\/p>\n","protected":false},"author":200020,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1412","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Ansible: Command line tools with example in Ansible - XOps Tutorials!!!<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ansible: Command line tools with example in Ansible - XOps Tutorials!!!\" \/>\n<meta property=\"og:description\" content=\"1. ansible The ansible command runs ad-hoc tasks (single modules) against hosts in the inventory. Command Name Description Example ansible &lt;host-pattern&gt; -m ping Ping all hosts to check connectivity. ansible all -m ping ansible &lt;host-pattern&gt; -m shell -a &quot;&lt;command&gt;&quot; Run a shell command with shell features (pipes, redirects). ansible webservers -m shell -a &quot;uptime&quot; ansible ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/\" \/>\n<meta property=\"og:site_name\" content=\"XOps Tutorials!!!\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-01T10:00:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-01T10:00:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/encrypted-tbn0.gstatic.com\/images?q=tbn:ANd9GcQ8hSB7mA_j86J8oEQZqYBo1_WLzcBJ5FomcA&amp;s\" \/>\n<meta name=\"author\" content=\"Pritesh Kumar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pritesh Kumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/\"},\"author\":{\"name\":\"Pritesh Kumar\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/121833f332dc4a3674d2904cface44f1\"},\"headline\":\"Ansible: Command line tools with example in Ansible\",\"datePublished\":\"2025-08-01T10:00:50+00:00\",\"dateModified\":\"2025-08-01T10:00:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/\"},\"wordCount\":802,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/encrypted-tbn0.gstatic.com\/images?q=tbn:ANd9GcQ8hSB7mA_j86J8oEQZqYBo1_WLzcBJ5FomcA&amp;s\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/\",\"url\":\"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/\",\"name\":\"Ansible: Command line tools with example in Ansible - XOps Tutorials!!!\",\"isPartOf\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/encrypted-tbn0.gstatic.com\/images?q=tbn:ANd9GcQ8hSB7mA_j86J8oEQZqYBo1_WLzcBJ5FomcA&amp;s\",\"datePublished\":\"2025-08-01T10:00:50+00:00\",\"dateModified\":\"2025-08-01T10:00:52+00:00\",\"author\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/121833f332dc4a3674d2904cface44f1\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/#primaryimage\",\"url\":\"https:\/\/encrypted-tbn0.gstatic.com\/images?q=tbn:ANd9GcQ8hSB7mA_j86J8oEQZqYBo1_WLzcBJ5FomcA&amp;s\",\"contentUrl\":\"https:\/\/encrypted-tbn0.gstatic.com\/images?q=tbn:ANd9GcQ8hSB7mA_j86J8oEQZqYBo1_WLzcBJ5FomcA&amp;s\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.xopsschool.com\/tutorials\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ansible: Command line tools with example in Ansible\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#website\",\"url\":\"https:\/\/www.xopsschool.com\/tutorials\/\",\"name\":\"XOps Tutorials!!!\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.xopsschool.com\/tutorials\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/121833f332dc4a3674d2904cface44f1\",\"name\":\"Pritesh Kumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/231a0e8b7a02636f2fbacf8dcf4494cb1cc0d49ecc9a8165fbaeaeeaf102641a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/231a0e8b7a02636f2fbacf8dcf4494cb1cc0d49ecc9a8165fbaeaeeaf102641a?s=96&d=mm&r=g\",\"caption\":\"Pritesh Kumar\"},\"description\":\"Devops Engineer at Cotocus pvt.ltd\",\"url\":\"https:\/\/www.xopsschool.com\/tutorials\/author\/priteshcotocus\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Ansible: Command line tools with example in Ansible - XOps Tutorials!!!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/","og_locale":"en_US","og_type":"article","og_title":"Ansible: Command line tools with example in Ansible - XOps Tutorials!!!","og_description":"1. ansible The ansible command runs ad-hoc tasks (single modules) against hosts in the inventory. Command Name Description Example ansible &lt;host-pattern&gt; -m ping Ping all hosts to check connectivity. ansible all -m ping ansible &lt;host-pattern&gt; -m shell -a \"&lt;command&gt;\" Run a shell command with shell features (pipes, redirects). ansible webservers -m shell -a \"uptime\" ansible ... Read more","og_url":"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/","og_site_name":"XOps Tutorials!!!","article_published_time":"2025-08-01T10:00:50+00:00","article_modified_time":"2025-08-01T10:00:52+00:00","og_image":[{"url":"https:\/\/encrypted-tbn0.gstatic.com\/images?q=tbn:ANd9GcQ8hSB7mA_j86J8oEQZqYBo1_WLzcBJ5FomcA&amp;s","type":"","width":"","height":""}],"author":"Pritesh Kumar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Pritesh Kumar","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/#article","isPartOf":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/"},"author":{"name":"Pritesh Kumar","@id":"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/121833f332dc4a3674d2904cface44f1"},"headline":"Ansible: Command line tools with example in Ansible","datePublished":"2025-08-01T10:00:50+00:00","dateModified":"2025-08-01T10:00:52+00:00","mainEntityOfPage":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/"},"wordCount":802,"commentCount":0,"image":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/#primaryimage"},"thumbnailUrl":"https:\/\/encrypted-tbn0.gstatic.com\/images?q=tbn:ANd9GcQ8hSB7mA_j86J8oEQZqYBo1_WLzcBJ5FomcA&amp;s","inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/","url":"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/","name":"Ansible: Command line tools with example in Ansible - XOps Tutorials!!!","isPartOf":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/#primaryimage"},"image":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/#primaryimage"},"thumbnailUrl":"https:\/\/encrypted-tbn0.gstatic.com\/images?q=tbn:ANd9GcQ8hSB7mA_j86J8oEQZqYBo1_WLzcBJ5FomcA&amp;s","datePublished":"2025-08-01T10:00:50+00:00","dateModified":"2025-08-01T10:00:52+00:00","author":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/121833f332dc4a3674d2904cface44f1"},"breadcrumb":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/#primaryimage","url":"https:\/\/encrypted-tbn0.gstatic.com\/images?q=tbn:ANd9GcQ8hSB7mA_j86J8oEQZqYBo1_WLzcBJ5FomcA&amp;s","contentUrl":"https:\/\/encrypted-tbn0.gstatic.com\/images?q=tbn:ANd9GcQ8hSB7mA_j86J8oEQZqYBo1_WLzcBJ5FomcA&amp;s"},{"@type":"BreadcrumbList","@id":"https:\/\/www.xopsschool.com\/tutorials\/ansible-command-line-tools-with-example-in-ansible\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.xopsschool.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Ansible: Command line tools with example in Ansible"}]},{"@type":"WebSite","@id":"https:\/\/www.xopsschool.com\/tutorials\/#website","url":"https:\/\/www.xopsschool.com\/tutorials\/","name":"XOps Tutorials!!!","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.xopsschool.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/121833f332dc4a3674d2904cface44f1","name":"Pritesh Kumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/231a0e8b7a02636f2fbacf8dcf4494cb1cc0d49ecc9a8165fbaeaeeaf102641a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/231a0e8b7a02636f2fbacf8dcf4494cb1cc0d49ecc9a8165fbaeaeeaf102641a?s=96&d=mm&r=g","caption":"Pritesh Kumar"},"description":"Devops Engineer at Cotocus pvt.ltd","url":"https:\/\/www.xopsschool.com\/tutorials\/author\/priteshcotocus\/"}]}},"_links":{"self":[{"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/posts\/1412","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/users\/200020"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/comments?post=1412"}],"version-history":[{"count":1,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/posts\/1412\/revisions"}],"predecessor-version":[{"id":1413,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/posts\/1412\/revisions\/1413"}],"wp:attachment":[{"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/media?parent=1412"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/categories?post=1412"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/tags?post=1412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}