In Ansible Expect Module, how to ignore warning text showing before responding to prompts? -


thanks reply provided question, learned expect module. in ansible playbook, use execute command , respond prompts. issue command returns stdout warning text before prompting username, email , password. expect task fails, guess because not line of text.

my playbook.yml

  - expect:         command: geonode createsuperuser         responses:           username: 'test'           email: 'test@whatever.com'           password: 'test' 

the failure report:

task [expect] ****************************************************************** fatal: [node1]: failed! => {"changed": true, "cmd": "geonode createsuperuser", "delta": "0:00:30.129827", "end": "2016-07-28 09:39:57.806523", "failed": true, "rc": null, "start": "2016-07-28 09:39:27.676696", "stdout": "not enabling bingmaps base layer bing_api_key not defined in local_settings.py file.\r\nusername: ", "stdout_lines": ["not enabling bingmaps base layer bing_api_key not defined in local_settings.py file.", "username: "]} 

unfortunately can't disable warning @ stage of configuration.

thank can provide.

response search phrases case sensitive! use:

responses:   username: test 

or:

responses:   (?i)username: test 

Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -