Repository: ansible/ansible-runner

Issue:
[Question] How to disable env/passwords to be created
Hi,

I run `ansible-runner` by providing password with a dict. It run with success. If I re-run the script. It's not working anymore.
The issue is, when I run the first time the script, `ansible-runner` create a the file `env/passwords` with the content of what I provided with my dict.
If I remove manually this folder, my script is working, but again, it re create the file ...

How to disable the creation of this sensitive file ?

```
import ansible_runner
passwords = {"SSH password:": "MYPASSWORD"}
r = ansible_runner.run(private_data_dir='/home/florian/ansible-runner-test', playbook='get_facts.yaml', inventory="myhosts", passwords=passwords)
print("{}: {}".format(r.status, r.rc))
# successful: 0
for each_host_event in r.events:
    print(each_host_event['event'])
print("Final status:")
print(r.stats)
```

Here's the error on my second run : 
```
(ansible-runner) florian@dsrauto-dev1:~/ansible-runner-test$ python main.py
Traceback (most recent call last):
  File "main.py", line 6, in <module>
    r = ansible_runner.run(private_data_dir='/home/florian/ansible-runner-test', playbook='get_facts.yaml', inventory="myhosts", passwords=passwords)
  File "/home/florian/.pyenv/versions/ansible-runner/lib/python3.8/site-packages/ansible_runner/interface.py", line 254, in run
    r = init_runner(**kwargs)
  File "/home/florian/.pyenv/versions/ansible-runner/lib/python3.8/site-packages/ansible_runner/interface.py", line 119, in init_runner
    rc.prepare()
  File "/home/florian/.pyenv/versions/ansible-runner/lib/python3.8/site-packages/ansible_runner/config/runner.py", line 144, in prepare
    self.prepare_env()
  File "/home/florian/.pyenv/versions/ansible-runner/lib/python3.8/site-packages/ansible_runner/config/runner.py", line 182, in prepare_env
    super(RunnerConfig, self)._prepare_env()
  File "/home/florian/.pyenv/versions/ansible-runner/lib/python3.8/site-packages/ansible_runner/config/_base.py", line 158, in _prepare_env
    for pattern, password in iteritems(self.passwords)
  File "/home/florian/.pyenv/versions/ansible-runner/lib/python3.8/site-packages/six.py", line 605, in iteritems
    return iter(d.items(**kw))
AttributeError: 'NoneType' object has no attribute 'items'
```

Discussion:

Patch:
diff --git a/ansible_runner/config/_base.py b/ansible_runner/config/_base.py
index 217c46b..a1e996f 100644
--- a/ansible_runner/config/_base.py
+++ b/ansible_runner/config/_base.py
@@ -147,7 +147,7 @@ class BaseConfig(object):
         self.runner_mode = runner_mode
         try:
             if self.settings and isinstance(self.settings, dict):
-                self.settings = self.settings.update(self.loader.load_file('env/settings', Mapping))
+                self.settings.update(self.loader.load_file('env/settings', Mapping))
             else:
                 self.settings = self.loader.load_file('env/settings', Mapping)
         except ConfigurationError:
@@ -157,7 +157,7 @@ class BaseConfig(object):
         if self.runner_mode == 'pexpect':
             try:
                 if self.passwords and isinstance(self.passwords, dict):
-                    self.passwords = self.passwords.update(self.loader.load_file('env/passwords', Mapping))
+                    self.passwords.update(self.loader.load_file('env/passwords', Mapping))
                 else:
                     self.passwords = self.passwords or self.loader.load_file('env/passwords', Mapping)
                 self.expect_passwords = {


Test patch:
diff --git a/test/integration/test_config.py b/test/integration/test_config.py
new file mode 100644
index 0000000..b79eab1
--- /dev/null
+++ b/test/integration/test_config.py
@@ -0,0 +1,7 @@
+from ansible_runner.config._base import BaseConfig
+
+
+def test_combine_python_and_file_settings(project_fixtures):
+    rc = BaseConfig(private_data_dir=str(project_fixtures / 'job_env'), settings={'job_timeout': 40})
+    rc._prepare_env()
+    assert rc.settings == {'job_timeout': 40, 'process_isolation': True}