##### SUMMARY
ASA: command is considered complete if it is not authorized. Initially, the problem was discovered when it turned out that our TACACS server does not include in the white list the command `no terminal pager`, which is executed when a connection is established with the device ([lib/ansible/plugins/terminal/asa.py#L49](https://github.com/ansible/ansible/blob/f09bd91ad078a5a484cac77df39af51586745990/lib/ansible/plugins/terminal/asa.py#L49)). The device responded with the line `Command authorization failed`, paging did not turn off, but no errors were output, but the subsequent execution of commands was incorrect due to the fact that the device performed paging and suggested pressing the spacebar.

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
* lib/ansible/plugins/terminal/asa.py


##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.9.0.dev0
  config file = /home/administrator/ansible/playbooks/asa_collect/ansible.cfg
  configured module search path = [u'/home/administrator/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/administrator/ansible_dev/ansible/lib/ansible
  executable location = /home/administrator/ansible_dev/ansible/bin/ansible
  python version = 2.7.13 (default, Sep 26 2018, 18:42:22) [GCC 6.3.0 20170516]
```

##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below
PARAMIKO_HOST_KEY_AUTO_ADD(/home/administrator/ansible/playbooks/asa_collect/ansible.cfg) = True
PARAMIKO_LOOK_FOR_KEYS(/home/administrator/ansible/playbooks/asa_collect/ansible.cfg) = True
PERSISTENT_COMMAND_TIMEOUT(/home/administrator/ansible/playbooks/asa_collect/ansible.cfg) = 60
RETRY_FILES_ENABLED(/home/administrator/ansible/playbooks/asa_collect/ansible.cfg) = False

```

##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
* debian 9.5
* ASA 9.6.*

##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
* ASA device authorizes commands through TACACS server
* the `no terminal pager` command is not included in the white list of allowed commands on the TACACS server
<!--- Paste example playbooks or commands between quotes below -->
```yaml
---
- hosts: all
  gather_facts: no
  tasks:
  - name: show commands
    asa_command:
     commands:
     - '<not allowed command>'
```

<!--- HINT: You can paste gist.github.com links for larger files -->

##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
expected error output when executing a command that is not allowed.

##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
no errors are output, but subsequent commands with a long output may be cut off or not executed at all due to the need to press the spacebar to scroll.

if self._get_prompt().strip().endswith(b'#'):
            self.disable_pager()
    def disable_pager(self):
        cmd = {u'command': u'no terminal pager'}
        try:
            self._exec_cli_command(u'no terminal pager')
        except AnsibleConnectionFailure:
            raise AnsibleConnectionFailure('unable to disable terminal pager')
    def on_become(self, passwd=None):
        if self._get_prompt().strip().endswith(b'#'):
            return
        cmd = {u'command': u'enable'}
        if passwd:
            
            
            cmd[u'prompt'] = to_text(r"[\r\n]?[Pp]assword: $", errors='surrogate_or_strict')
            cmd[u'answer'] = passwd
        try:
            self._exec_cli_command(to_bytes(json.dumps(cmd), errors='surrogate_or_strict'))
        except AnsibleConnectionFailure:
            raise AnsibleConnectionFailure('unable to elevate privilege to enable mode')
        self.disable_pager()