Repository: ansible/molecule

Issue:
Add tty option to docker provisioner
# Issue Type

- Feature request

# Molecule and Ansible details

```
$ ansible --version && molecule --version
ansible 2.7.7
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['~/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.7.3rc1 (default, Mar 13 2019, 11:01:15) [GCC 8.3.0]
molecule, version 2.20.2.dev70+g02db6afd.d20190425
```

Molecule installation method (one of):

- source

Ansible installation method (one of):

- OS package

# Desired Behavior

When running systemd enabled containers (e.g. `centos`), docker logs can only be retrieved if the docker container is started with `tty=true`. Extend the molecule docker provisioner to pass this flag to `docker_container` ansible module.


Discussion:

Resolving patch:
diff --git a/molecule/driver/docker.py b/molecule/driver/docker.py
--- a/molecule/driver/docker.py
+++ b/molecule/driver/docker.py
@@ -59,6 +59,7 @@ class Docker(base.Base):
                 email: user@example.com
             override_command: True|False
             command: sleep infinity
+            tty: True|False
             pid_mode: host
             privileged: True|False
             security_opts:
@@ -117,6 +118,7 @@ class Docker(base.Base):
           volume_mounts:
             - "/sys/fs/cgroup:/sys/fs/cgroup:rw"
           command: "/usr/sbin/init"
+          tty: True
           environment:
             container: docker
 
diff --git a/molecule/model/schema_v2.py b/molecule/model/schema_v2.py
--- a/molecule/model/schema_v2.py
+++ b/molecule/model/schema_v2.py
@@ -656,6 +656,10 @@ def pre_validate_base_schema(env, keep_string):
                     'type': 'string',
                     'nullable': True,
                 },
+                'tty': {
+                    'type': 'boolean',
+                    'nullable': True,
+                },
                 'pid_mode': {
                     'type': 'string',
                 },


Test patch:
diff --git a/test/unit/model/v2/test_platforms_section.py b/test/unit/model/v2/test_platforms_section.py
--- a/test/unit/model/v2/test_platforms_section.py
+++ b/test/unit/model/v2/test_platforms_section.py
@@ -52,6 +52,8 @@ def _model_platforms_docker_section_data():
             False,
             'command':
             'sleep infinity',
+            'tty':
+            True,
             'pid_mode':
             'host',
             'privileged':
@@ -164,6 +166,7 @@ def _model_platforms_docker_errors_section_data():
             },
             'override_command': int(),
             'command': int(),
+            'tty': str(),
             'pid_mode': int(),
             'privileged': str(),
             'security_opts': [
@@ -232,6 +235,7 @@ def test_platforms_docker_has_errors(_config):
                 'privileged': ['must be of boolean type'],
                 'override_command': ['must be of boolean type'],
                 'command': ['must be of string type'],
+                'tty': ['must be of boolean type'],
                 'registry': [{
                     'url': ['must be of string type'],
                     'credentials': [{