'Command line argument processing'

def parse_cli_args(self):

    parser = argparse.ArgumentParser(description='Produce    an    Ansible    Inventory    file    based    on    EC2')
    parser.add_argument('--tags-only', action='store_true', default=False, help='only    return    tags    (default:    False)')
    parser.add_argument('--list', action='store_true', default=True, help='List    instances    (default:    True)')
    parser.add_argument('--host', action='store', help='Get    all    the    variables    about    a    specific    instance')
    parser.add_argument('--refresh-cache', action='store_true', default=False, help='Force    refresh    of    cache    by    making    API    requests    to    EC2    (default:    False    -    use    cache    files)')
    default_inifile = os.environ.get('ANSIBLE_EC2_INI', (os.path.dirname(os.path.realpath(__file__)) + '/ec2.ini'))
    parser.add_argument('--inifile', dest='inifile', help='Path    to    init    script    to    use', default=default_inifile)
    parser.add_argument('--cache-path', help='Override    the    cache    path    set    in    ini    file', required=False)
    self.args = parser.parse_args()
