Can we disable pipelining in ansible-playbook but have it in ansible.cfg?

You can force Ansible to connect using Paramiko instead of OpenSSH. Paramiko doesn't use pipelining:

- hosts: my_servers
  remote_user: centos
  become: yes
  become_user: root
  gather_facts: false
  connection: paramiko
  tasks:
    - name: disable requiretty in /etc/sudoers
      replace: regexp="^Defaults\s+requiretty$" replace="# Defaults    requiretty" dest="/etc/sudoers"

My guess is that this kind of option that configure connection behaviour is set for the whole ansible run.

So if you want to disable it for a single playbook (i.e. an ansible-playbook run), you can override pipelining using environment variables :

ANSIBLE_SSH_PIPELINING=0 ansible-playbook ...

This should work.

Good luck !