makeporngreatagain.pro
yeahporn.top
hd xxx

Running Ansible Task & Adhoc Commands

682
  1. Using “Ping” Module
    1. Login to your ansible host and try to run:
      ansible -m ping all
    2. This will return failed status code since our ansible host is able to login into our host machine, for letting ansible host to successfully we will need to provide .pem file to ansible host and configure ansible.cfg to read that .pem file
    3. Copy your EC2 instance private key .pem file to ansible host in following directory /home/ec2-user/ansible
    4. Now modify your ansible.cfg as follows
      # ansible.cfg
      
      [defaults]
      inventory = ./hosts-dev
      remote_user = <SSH_USERNAME>
      private_key_file = /path_to/<SSH_KEY>.pem
      host_key_checking = False
    5. Now try to run:
      ansible -m ping all
  2. Using “Shell” Module
    1. Lets try to which linux distro we are using:
      ansible -m shell -a "uname"
    2. This will return distro name
  3. Using “Command” Module
    1. Lets try to run some false command in bin
      ansible -m command -a "/bin/false" \!local
    2. This will return non-zero return code
Leave A Reply

Your email address will not be published.

baseofporn.com https://www.opoptube.com
Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.