Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Unable to create a new configuration file using redirection #1607

Open
xz-dev opened this issue Sep 16, 2023 · 2 comments
Open

[BUG] Unable to create a new configuration file using redirection #1607

xz-dev opened this issue Sep 16, 2023 · 2 comments
Assignees
Labels
bug Researched, reproducible, committed to fix documentation Improvements or additions to documentation upstream waiting on author Additional information is needed form the author of the issue

Comments

@xz-dev
Copy link

xz-dev commented Sep 16, 2023

ISSUE TYPE
  • Bug Report
SUMMARY

Unable to create a new configuration file using redirection.
You can try ansible-navigator config init -m stdout > ansible.cfg to reproduce it.

ANSIBLE-NAVIGATOR VERSION
ansible-navigator 3.4.3.dev6
CONFIGURATION
LOG FILE
STEPS TO REPRODUCE

Run ansible-navigator config init -m stdout > ansible.cfg

cat ansible.cfg

�[?1h�= [defaults]�[m # (boolean) By default Ansible will issue a warning when received from a task action (module or action plugin)�[m # These warnings can be silenced by adjusting this setting to False.�[m action_warnings=True�[m �[m # (list) Accept list of cowsay templates that are 'safe' to use, set to empty list if you want to enable all installed templates.�[m cowsay_enabled_stencils=bud-frogs, bunny, cheese, daemon, default, dragon, elephant-in-snake, elephant, eyes, hellokitty, kitty, luke-koal�[m�[7m>�[27m �[m # (string) Specify a custom cowsay path or swap in your cowsay implementation of choice�[m cowpath=�[m �[m # (string) This allows you to chose a specific cowsay stencil for the banners or use 'random' to cycle through them.�[m cow_selection=default�[m �[m # (boolean) This option forces color mode even when running without a TTY or the "nocolor" setting is True.�[m force_color=False�[m �[m # (path) The default root path for Ansible config files on the controller.�[m home=~/.ansible�[m �[m # (boolean) This setting allows suppressing colorizing output, which is used to give a better indication of failure and status information.�[m nocolor=False�[m �[m # (boolean) If you have cowsay installed but want to avoid the 'cows' (why????), use this.�[m nocows=False�[m �[m # (boolean) Sets the default value for the any_errors_fatal keyword, if True, Task failures will be considered fatal errors.�[m any_errors_fatal=False�[m �[m # (path) The password file to use for the become plugin. --become-password-file.�[m # If executable, it will be run and the resulting stdout will be used as the password.�[m become_password_file=�[m �[m # (pathspec) Colon separated paths in which Ansible will search for Become Plugins.�[m become_plugins={{ ANSIBLE_HOME ~ "/plugins/become:/usr/share/ansible/plugins/become" }}�[m �[m # (string) Chooses which cache plugin to use, the default 'memory' is ephemeral.�[m fact_caching=memory�[m �[m # (string) Defines connection or path information for the cache plugin�[m fact_caching_connection=�[m �[m # (string) Prefix to use for cache plugin files/tables�[m fact_caching_prefix=ansible_facts�[m �[m # (integer) Expiration timeout for the cache plugin data�[m fact_caching_timeout=86400�[m �[m # (list) List of enabled callbacks, not all callbacks need enabling, but many of those shipped with Ansible do as we don't want them activ�[m�[7m>�[27m callbacks_enabled=�[m �[m # (string) When a collection is loaded that does not support the running Ansible version (with the collection metadata key `requires_ansib�[m�[7m>�[27m collections_on_ansible_version_mismatch=warning�[m �[m # (pathspec) Colon separated paths in which Ansible will search for collections content. Collections must be in nested *subdirectories*, n�[m�[7m>�[27m �[m collections_path={{ ANSIBLE_HOME ~ "/collections:/usr/share/ansible/collections" }}�[m �[m # (boolean) A boolean to enable or disable scanning the sys.path for installed collections�[m collections_scan_sys_path=True�[m �[m # (path) The password file to use for the connection plugin. --connection-password-file.�[m connection_password_file=�[m �[m # (pathspec) Colon separated paths in which Ansible will search for Action Plugins.�[m action_plugins={{ ANSIBLE_HOME ~ "/plugins/action:/usr/share/ansible/plugins/action" }}�[m �[m # (boolean) When enabled, this option allows lookup plugins (whether used in variables as ``{{lookup('foo')}}`` or as a loop as with_foo) �[m�[7m>�[27m # By default, such data is marked as unsafe to prevent the templating engine from evaluating any jinja2 templating language, as this could�[m�[7m>�[27m allow_unsafe_lookups=False�[m �[m # (boolean) This controls whether an Ansible playbook should prompt for a login password. If using SSH keys for authentication, you probab�[m�[7m>�[27m ask_pass=False�[m :�[K�[H�[2J�[H�[H�[2J�[H[defaults]�[m # (boolean) By default Ansible will issue a warning when received from a task action (module or action plugin)�[m # These warnings can be silenced by adjusting this setting to False.�[m action_warnings=True�[m �[m # (list) Accept list of cowsay templates that are 'safe' to use, set to empty list if you want to enable all installed templates.�[m cowsay_enabled_stencils=bud-frogs, bunny, cheese, daemon, default, dragon, elephant-in-snake, elephant, eyes, hellokitty, kitty, luke-koal�[m�[7m>�[27m �[m # (string) Specify a custom cowsay path or swap in your cowsay implementation of choice�[m cowpath=�[m �[m # (string) This allows you to chose a specific cowsay stencil for the banners or use 'random' to cycle through them.�[m cow_selection=default�[m �[m # (boolean) This option forces color mode even when running without a TTY or the "nocolor" setting is True.�[m force_color=False�[m �[m # (path) The default root path for Ansible config files on the controller.�[m home=~/.ansible�[m �[m # (boolean) This setting allows suppressing colorizing output, which is used to give a better indication of failure and status information.�[m nocolor=False�[m �[m # (boolean) If you have cowsay installed but want to avoid the 'cows' (why????), use this.�[m nocows=False�[m �[m # (boolean) Sets the default value for the any_errors_fatal keyword, if True, Task failures will be considered fatal errors.�[m any_errors_fatal=False�[m �[m # (path) The password file to use for the become plugin. --become-password-file.�[m # If executable, it will be run and the resulting stdout will be used as the password.�[m become_password_file=�[m �[m # (pathspec) Colon separated paths in which Ansible will search for Become Plugins.�[m become_plugins={{ ANSIBLE_HOME ~ "/plugins/become:/usr/share/ansible/plugins/become" }}�[m :�[K�[H�[2J�[H�[H�[2J�[H[defaults]�[m # (boolean) By default Ansible will issue a warning when received from a task action (module or action plugin)�[m # These warnings can be silenced by adjusting this setting to False.�[m action_warnings=True�[m �[m # (list) Accept list of cowsay templates that are 'safe' to use, set to empty list if you want to enable all installed templates.�[m cowsay_enabled_stencils=bud-frogs, bunny, cheese, daemon, default, dragon, elephant-in-snake, elephant, eyes, hellokitty, kitty, luke-koal�[m�[7m>�[27m �[m # (string) Specify a custom cowsay path or swap in your cowsay implementation of choice�[m cowpath=�[m �[m # (string) This allows you to chose a specific cowsay stencil for the banners or use 'random' to cycle through them.�[m cow_selection=default�[m �[m # (boolean) This option forces color mode even when running without a TTY or the "nocolor" setting is True.�[m force_color=False�[m �[m # (path) The default root path for Ansible config files on the controller.�[m home=~/.ansible�[m �[m # (boolean) This setting allows suppressing colorizing output, which is used to give a better indication of failure and status information.�[m nocolor=False�[m �[m # (boolean) If you have cowsay installed but want to avoid the 'cows' (why????), use this.�[m nocows=False�[m �[m # (boolean) Sets the default value for the any_errors_fatal keyword, if True, Task failures will be considered fatal errors.�[m any_errors_fatal=False�[m �[m # (path) The password file to use for the become plugin. --become-password-file.�[m # If executable, it will be run and the resulting stdout will be used as the password.�[m become_password_file=�[m �[m # (pathspec) Colon separated paths in which Ansible will search for Become Plugins.�[m become_plugins={{ ANSIBLE_HOME ~ "/plugins/become:/usr/share/ansible/plugins/become" }}�[m :�[K�[H�[2J�[H�[H�[2J�[H[defaults]�[m # (boolean) By default Ansible will issue a warning when received from a task action (module or action plugin)�[m # These warnings can be silenced by adjusting this setting to False.�[m action_warnings=True�[m �[m # (list) Accept list of cowsay templates that are 'safe' to use, set to empty list if you want to enable all installed templates.�[m cowsay_enabled_stencils=bud-frogs, bunny, cheese, daemon, default, dragon, elephant-in-snake, elephant, eyes, hellokitty, kitty, luke-koal�[m�[7m>�[27m �[m # (string) Specify a custom cowsay path or swap in your cowsay implementation of choice�[m cowpath=�[m �[m # (string) This allows you to chose a specific cowsay stencil for the banners or use 'random' to cycle through them.�[m cow_selection=default�[m �[m # (boolean) This option forces color mode even when running without a TTY or the "nocolor" setting is True.�[m force_color=False�[m �[m # (path) The default root path for Ansible config files on the controller.�[m home=~/.ansible�[m �[m # (boolean) This setting allows suppressing colorizing output, which is used to give a better indication of failure and status information.�[m nocolor=False�[m �[m # (boolean) If you have cowsay installed but want to avoid the 'cows' (why????), use this.�[m nocows=False�[m �[m # (boolean) Sets the default value for the any_errors_fatal keyword, if True, Task failures will be considered fatal errors.�[m any_errors_fatal=False�[m �[m # (path) The password file to use for the become plugin. --become-password-file.�[m # If executable, it will be run and the resulting stdout will be used as the password.�[m become_password_file=�[m �[m # (pathspec) Colon separated paths in which Ansible will search for Become Plugins.�[m become_plugins={{ ANSIBLE_HOME ~ "/plugins/become:/usr/share/ansible/plugins/become" }}�[m �[m # (string) Chooses which cache plugin to use, the default 'memory' is ephemeral.�[m fact_caching=memory�[m �[m # (string) Defines connection or path information for the cache plugin�[m fact_caching_connection=�[m �[m # (string) Prefix to use for cache plugin files/tables�[m fact_caching_prefix=ansible_facts�[m �[m # (integer) Expiration timeout for the cache plugin data�[m fact_caching_timeout=86400�[m �[m # (list) List of enabled callbacks, not all callbacks need enabling, but many of those shipped with Ansible do as we don't want them activ�[m�[7m>�[27m callbacks_enabled=�[m �[m # (string) When a collection is loaded that does not support the running Ansible version (with the collection metadata key `requires_ansib�[m�[7m>�[27m collections_on_ansible_version_mismatch=warning�[m �[m # (pathspec) Colon separated paths in which Ansible will search for collections content. Collections must be in nested *subdirectories*, n�[m�[7m>�[27m �[m collections_path={{ ANSIBLE_HOME ~ "/collections:/usr/share/ansible/collections" }}�[m �[m # (boolean) A boolean to enable or disable scanning the sys.path for installed collections�[m collections_scan_sys_path=True�[m �[m # (path) The password file to use for the connection plugin. --connection-password-file.�[m connection_password_file=�[m �[m # (pathspec) Colon separated paths in which Ansible will search for Action Plugins.�[m action_plugins={{ ANSIBLE_HOME ~ "/plugins/action:/usr/share/ansible/plugins/action" }}�[m �[m # (boolean) When enabled, this option allows lookup plugins (whether used in variables as ``{{lookup('foo')}}`` or as a loop as with_foo) �[m�[7m>�[27m # By default, such data is marked as unsafe to prevent the templating engine from evaluating any jinja2 templating language, as this could�[m�[7m>�[27m allow_unsafe_lookups=False�[m �[m # (boolean) This controls whether an Ansible playbook should prompt for a login password. If using SSH keys for authentication, you probab�[m�[7m>�[27m ask_pass=False�[m :�[K�[H�[2J�[H�[H�[2J�[H[defaults]�[m # (boolean) By default Ansible will issue a warning when received from a task action (module or action plugin)�[m # These warnings can be silenced by adjusting this setting to False.�[m action_warnings=True�[m �[m # (list) Accept list of cowsay templates that are 'safe' to use, set to empty list if you want to enable all installed templates.�[m cowsay_enabled_stencils=bud-frogs, bunny, cheese, daemon, default, dragon, elephant-in-snake, elephant, eyes, hellokitty, kitty, luke-koal�[m�[7m>�[27m �[m # (string) Specify a custom cowsay path or swap in your cowsay implementation of choice�[m cowpath=�[m �[m # (string) This allows you to chose a specific cowsay stencil for the banners or use 'random' to cycle through them.�[m cow_selection=default�[m �[m # (boolean) This option forces color mode even when running without a TTY or the "nocolor" setting is True.�[m force_color=False�[m �[m # (path) The default root path for Ansible config files on the controller.�[m home=~/.ansible�[m �[m # (boolean) This setting allows suppressing colorizing output, which is used to give a better indication of failure and status information.�[m nocolor=False�[m �[m # (boolean) If you have cowsay installed but want to avoid the 'cows' (why????), use this.�[m nocows=False�[m �[m # (boolean) Sets the default value for the any_errors_fatal keyword, if True, Task failures will be considered fatal errors.�[m any_errors_fatal=False�[m �[m # (path) The password file to use for the become plugin. --become-password-file.�[m # If executable, it will be run and the resulting stdout will be used as the password.�[m become_password_file=�[m �[m # (pathspec) Colon separated paths in which Ansible will search for Become Plugins.�[m become_plugins={{ ANSIBLE_HOME ~ "/plugins/become:/usr/share/ansible/plugins/become" }}�[m �[m # (string) Chooses which cache plugin to use, the default 'memory' is ephemeral.�[m fact_caching=memory�[m �[m # (string) Defines connection or path information for the cache plugin�[m fact_caching_connection=�[m �[m # (string) Prefix to use for cache plugin files/tables�[m fact_caching_prefix=ansible_facts�[m �[m # (integer) Expiration timeout for the cache plugin data�[m fact_caching_timeout=86400�[m �[m # (list) List of enabled callbacks, not all callbacks need enabling, but many of those shipped with Ansible do as we don't want them activ�[m�[7m>�[27m callbacks_enabled=�[m �[m # (string) When a collection is loaded that does not support the running Ansible version (with the collection metadata key `requires_ansib�[m�[7m>�[27m collections_on_ansible_version_mismatch=warning�[m �[m # (pathspec) Colon separated paths in which Ansible will search for collections content. Collections must be in nested *subdirectories*, n�[m�[7m>�[27m �[m collections_path={{ ANSIBLE_HOME ~ "/collections:/usr/share/ansible/collections" }}�[m �[m # (boolean) A boolean to enable or disable scanning the sys.path for installed collections�[m collections_scan_sys_path=True�[m �[m # (path) The password file to use for the connection plugin. --connection-password-file.�[m connection_password_file=�[m �[m # (pathspec) Colon separated paths in which Ansible will search for Action Plugins.�[m action_plugins={{ ANSIBLE_HOME ~ "/plugins/action:/usr/share/ansible/plugins/action" }}�[m �[m # (boolean) When enabled, this option allows lookup plugins (whether used in variables as ``{{lookup('foo')}}`` or as a loop as with_foo) �[m�[7m>�[27m # By default, such data is marked as unsafe to prevent the templating engine from evaluating any jinja2 templating language, as this could�[m�[7m>�[27m allow_unsafe_lookups=False�[m �[m # (boolean) This controls whether an Ansible playbook should prompt for a login password. If using SSH keys for authentication, you probab�[m�[7m>�[27m ask_pass=False�[m :�[K��[H�[2J�[H�[H�[2J�[H[defaults]�[m # (boolean) By default Ansible will issue a warning when received from a task action (module or action plugin)�[m # These warnings can be silenced by adjusting this setting to False.�[m action_warnings=True�[m �[m # (list) Accept list of cowsay templates that are 'safe' to use, set to empty list if you want to enable all installed templates.�[m cowsay_enabled_stencils=bud-frogs, bunny, cheese, daemon, default, dragon, elephant-in-snake, elephant, eyes, hellokitty, kitty, luke-koal�[m�[7m>�[27m �[m # (string) Specify a custom cowsay path or swap in your cowsay implementation of choice�[m cowpath=�[m �[m # (string) This allows you to chose a specific cowsay stencil for the banners or use 'random' to cycle through them.�[m cow_selection=default�[m �[m # (boolean) This option forces color mode even when running without a TTY or the "nocolor" setting is True.�[m force_color=False�[m �[m # (path) The default root path for Ansible config files on the controller.�[m home=~/.ansible�[m �[m # (boolean) This setting allows suppressing colorizing output, which is used to give a better indication of failure and status information.�[m nocolor=False�[m �[m # (boolean) If you have cowsay installed but want to avoid the 'cows' (why????), use this.�[m nocows=False�[m �[m # (boolean) Sets the default value for the any_errors_fatal keyword, if True, Task failures will be considered fatal errors.�[m any_errors_fatal=False�[m �[m # (path) The password file to use for the become plugin. --become-password-file.�[m # If executable, it will be run and the resulting stdout will be used as the password.�[m become_password_file=�[m �[m # (pathspec) Colon separated paths in which Ansible will search for Become Plugins.�[m become_plugins={{ ANSIBLE_HOME ~ "/plugins/become:/usr/share/ansible/plugins/become" }}�[m �[m # (string) Chooses which cache plugin to use, the default 'memory' is ephemeral.�[m fact_caching=memory�[m �[m # (string) Defines connection or path information for the cache plugin�[m fact_caching_connection=�[m �[m # (string) Prefix to use for cache plugin files/tables�[m fact_caching_prefix=ansible_facts�[m �[m # (integer) Expiration timeout for the cache plugin data�[m fact_caching_timeout=86400�[m �[m # (list) List of enabled callbacks, not all callbacks need enabling, but many of those shipped with Ansible do as we don't want them activ�[m�[7m>�[27m callbacks_enabled=�[m �[m # (string) When a collection is loaded that does not support the running Ansible version (with the collection metadata key `requires_ansib�[m�[7m>�[27m collections_on_ansible_version_mismatch=warning�[m �[m # (pathspec) Colon separated paths in which Ansible will search for collections content. Collections must be in nested *subdirectories*, n�[m�[7m>�[27m �[m collections_path={{ ANSIBLE_HOME ~ "/collections:/usr/share/ansible/collections" }}�[m �[m # (boolean) A boolean to enable or disable scanning the sys.path for installed collections�[m collections_scan_sys_path=True�[m �[m # (path) The password file to use for the connection plugin. --connection-password-file.�[m connection_password_file=�[m �[m # (pathspec) Colon separated paths in which Ansible will search for Action Plugins.�[m action_plugins={{ ANSIBLE_HOME ~ "/plugins/action:/usr/share/ansible/plugins/action" }}�[m �[m # (boolean) When enabled, this option allows lookup plugins (whether used in variables as ``{{lookup('foo')}}`` or as a loop as with_foo) �[m�[7m>�[27m # By default, such data is marked as unsafe to prevent the templating engine from evaluating any jinja2 templating language, as this could�[m�[7m>�[27m allow_unsafe_lookups=False�[m �[m # (boolean) This controls whether an Ansible playbook should prompt for a login password. If using SSH keys for authentication, you probab�[m�[7m>�[27m ask_pass=False�[m :�[K
EXPECTED RESULTS

It should been working like ansible-config init > ansible.cfg

ACTUAL RESULTS

Run ansible-navigator config init -m stdout > ansible.cfg

cat ansible.cfg

�[?1h�= [defaults]�[m # (boolean) By default Ansible will issue a warning when received from a task action (module or action plugin)�[m # These warnings can be silenced by adjusting this setting to False.�[m action_warnings=True�[m �[m # (list) Accept list of cowsay templates that are 'safe' to use, set to empty list if you want to enable all installed templates.�[m cowsay_enabled_stencils=bud-frogs, bunny, cheese, daemon, default, dragon, elephant-in-snake, elephant, eyes, hellokitty, kitty, luke-koal�[m�[7m>�[27m �[m # (string) Specify a custom cowsay path or swap in your cowsay implementation of choice�[m cowpath=�[m �[m # (string) This allows you to chose a specific cowsay stencil for the banners or use 'random' to cycle through them.�[m cow_selection=default�[m �[m # (boolean) This option forces color mode even when running without a TTY or the "nocolor" setting is True.�[m force_color=False�[m �[m # (path) The default root path for Ansible config files on the controller.�[m home=~/.ansible�[m �[m # (boolean) This setting allows suppressing colorizing output, which is used to give a better indication of failure and status information.�[m nocolor=False�[m �[m # (boolean) If you have cowsay installed but want to avoid the 'cows' (why????), use this.�[m nocows=False�[m �[m # (boolean) Sets the default value for the any_errors_fatal keyword, if True, Task failures will be considered fatal errors.�[m any_errors_fatal=False�[m �[m # (path) The password file to use for the become plugin. --become-password-file.�[m # If executable, it will be run and the resulting stdout will be used as the password.�[m become_password_file=�[m �[m # (pathspec) Colon separated paths in which Ansible will search for Become Plugins.�[m become_plugins={{ ANSIBLE_HOME ~ "/plugins/become:/usr/share/ansible/plugins/become" }}�[m �[m # (string) Chooses which cache plugin to use, the default 'memory' is ephemeral.�[m fact_caching=memory�[m �[m # (string) Defines connection or path information for the cache plugin�[m fact_caching_connection=�[m �[m # (string) Prefix to use for cache plugin files/tables�[m fact_caching_prefix=ansible_facts�[m �[m # (integer) Expiration timeout for the cache plugin data�[m fact_caching_timeout=86400�[m �[m # (list) List of enabled callbacks, not all callbacks need enabling, but many of those shipped with Ansible do as we don't want them activ�[m�[7m>�[27m callbacks_enabled=�[m �[m # (string) When a collection is loaded that does not support the running Ansible version (with the collection metadata key `requires_ansib�[m�[7m>�[27m collections_on_ansible_version_mismatch=warning�[m �[m # (pathspec) Colon separated paths in which Ansible will search for collections content. Collections must be in nested *subdirectories*, n�[m�[7m>�[27m �[m collections_path={{ ANSIBLE_HOME ~ "/collections:/usr/share/ansible/collections" }}�[m �[m # (boolean) A boolean to enable or disable scanning the sys.path for installed collections�[m collections_scan_sys_path=True�[m �[m # (path) The password file to use for the connection plugin. --connection-password-file.�[m connection_password_file=�[m �[m # (pathspec) Colon separated paths in which Ansible will search for Action Plugins.�[m action_plugins={{ ANSIBLE_HOME ~ "/plugins/action:/usr/share/ansible/plugins/action" }}�[m �[m # (boolean) When enabled, this option allows lookup plugins (whether used in variables as ``{{lookup('foo')}}`` or as a loop as with_foo) �[m�[7m>�[27m # By default, such data is marked as unsafe to prevent the templating engine from evaluating any jinja2 templating language, as this could�[m�[7m>�[27m allow_unsafe_lookups=False�[m �[m # (boolean) This controls whether an Ansible playbook should prompt for a login password. If using SSH keys for authentication, you probab�[m�[7m>�[27m ask_pass=False�[m :�[K�[H�[2J�[H�[H�[2J�[H[defaults]�[m # (boolean) By default Ansible will issue a warning when received from a task action (module or action plugin)�[m # These warnings can be silenced by adjusting this setting to False.�[m action_warnings=True�[m �[m # (list) Accept list of cowsay templates that are 'safe' to use, set to empty list if you want to enable all installed templates.�[m cowsay_enabled_stencils=bud-frogs, bunny, cheese, daemon, default, dragon, elephant-in-snake, elephant, eyes, hellokitty, kitty, luke-koal�[m�[7m>�[27m �[m # (string) Specify a custom cowsay path or swap in your cowsay implementation of choice�[m cowpath=�[m �[m # (string) This allows you to chose a specific cowsay stencil for the banners or use 'random' to cycle through them.�[m cow_selection=default�[m �[m # (boolean) This option forces color mode even when running without a TTY or the "nocolor" setting is True.�[m force_color=False�[m �[m # (path) The default root path for Ansible config files on the controller.�[m home=~/.ansible�[m �[m # (boolean) This setting allows suppressing colorizing output, which is used to give a better indication of failure and status information.�[m nocolor=False�[m �[m # (boolean) If you have cowsay installed but want to avoid the 'cows' (why????), use this.�[m nocows=False�[m �[m # (boolean) Sets the default value for the any_errors_fatal keyword, if True, Task failures will be considered fatal errors.�[m any_errors_fatal=False�[m �[m # (path) The password file to use for the become plugin. --become-password-file.�[m # If executable, it will be run and the resulting stdout will be used as the password.�[m become_password_file=�[m �[m # (pathspec) Colon separated paths in which Ansible will search for Become Plugins.�[m become_plugins={{ ANSIBLE_HOME ~ "/plugins/become:/usr/share/ansible/plugins/become" }}�[m :�[K�[H�[2J�[H�[H�[2J�[H[defaults]�[m # (boolean) By default Ansible will issue a warning when received from a task action (module or action plugin)�[m # These warnings can be silenced by adjusting this setting to False.�[m action_warnings=True�[m �[m # (list) Accept list of cowsay templates that are 'safe' to use, set to empty list if you want to enable all installed templates.�[m cowsay_enabled_stencils=bud-frogs, bunny, cheese, daemon, default, dragon, elephant-in-snake, elephant, eyes, hellokitty, kitty, luke-koal�[m�[7m>�[27m �[m # (string) Specify a custom cowsay path or swap in your cowsay implementation of choice�[m cowpath=�[m �[m # (string) This allows you to chose a specific cowsay stencil for the banners or use 'random' to cycle through them.�[m cow_selection=default�[m �[m # (boolean) This option forces color mode even when running without a TTY or the "nocolor" setting is True.�[m force_color=False�[m �[m # (path) The default root path for Ansible config files on the controller.�[m home=~/.ansible�[m �[m # (boolean) This setting allows suppressing colorizing output, which is used to give a better indication of failure and status information.�[m nocolor=False�[m �[m # (boolean) If you have cowsay installed but want to avoid the 'cows' (why????), use this.�[m nocows=False�[m �[m # (boolean) Sets the default value for the any_errors_fatal keyword, if True, Task failures will be considered fatal errors.�[m any_errors_fatal=False�[m �[m # (path) The password file to use for the become plugin. --become-password-file.�[m # If executable, it will be run and the resulting stdout will be used as the password.�[m become_password_file=�[m �[m # (pathspec) Colon separated paths in which Ansible will search for Become Plugins.�[m become_plugins={{ ANSIBLE_HOME ~ "/plugins/become:/usr/share/ansible/plugins/become" }}�[m :�[K�[H�[2J�[H�[H�[2J�[H[defaults]�[m # (boolean) By default Ansible will issue a warning when received from a task action (module or action plugin)�[m # These warnings can be silenced by adjusting this setting to False.�[m action_warnings=True�[m �[m # (list) Accept list of cowsay templates that are 'safe' to use, set to empty list if you want to enable all installed templates.�[m cowsay_enabled_stencils=bud-frogs, bunny, cheese, daemon, default, dragon, elephant-in-snake, elephant, eyes, hellokitty, kitty, luke-koal�[m�[7m>�[27m �[m # (string) Specify a custom cowsay path or swap in your cowsay implementation of choice�[m cowpath=�[m �[m # (string) This allows you to chose a specific cowsay stencil for the banners or use 'random' to cycle through them.�[m cow_selection=default�[m �[m # (boolean) This option forces color mode even when running without a TTY or the "nocolor" setting is True.�[m force_color=False�[m �[m # (path) The default root path for Ansible config files on the controller.�[m home=~/.ansible�[m �[m # (boolean) This setting allows suppressing colorizing output, which is used to give a better indication of failure and status information.�[m nocolor=False�[m �[m # (boolean) If you have cowsay installed but want to avoid the 'cows' (why????), use this.�[m nocows=False�[m �[m # (boolean) Sets the default value for the any_errors_fatal keyword, if True, Task failures will be considered fatal errors.�[m any_errors_fatal=False�[m �[m # (path) The password file to use for the become plugin. --become-password-file.�[m # If executable, it will be run and the resulting stdout will be used as the password.�[m become_password_file=�[m �[m # (pathspec) Colon separated paths in which Ansible will search for Become Plugins.�[m become_plugins={{ ANSIBLE_HOME ~ "/plugins/become:/usr/share/ansible/plugins/become" }}�[m �[m # (string) Chooses which cache plugin to use, the default 'memory' is ephemeral.�[m fact_caching=memory�[m �[m # (string) Defines connection or path information for the cache plugin�[m fact_caching_connection=�[m �[m # (string) Prefix to use for cache plugin files/tables�[m fact_caching_prefix=ansible_facts�[m �[m # (integer) Expiration timeout for the cache plugin data�[m fact_caching_timeout=86400�[m �[m # (list) List of enabled callbacks, not all callbacks need enabling, but many of those shipped with Ansible do as we don't want them activ�[m�[7m>�[27m callbacks_enabled=�[m �[m # (string) When a collection is loaded that does not support the running Ansible version (with the collection metadata key `requires_ansib�[m�[7m>�[27m collections_on_ansible_version_mismatch=warning�[m �[m # (pathspec) Colon separated paths in which Ansible will search for collections content. Collections must be in nested *subdirectories*, n�[m�[7m>�[27m �[m collections_path={{ ANSIBLE_HOME ~ "/collections:/usr/share/ansible/collections" }}�[m �[m # (boolean) A boolean to enable or disable scanning the sys.path for installed collections�[m collections_scan_sys_path=True�[m �[m # (path) The password file to use for the connection plugin. --connection-password-file.�[m connection_password_file=�[m �[m # (pathspec) Colon separated paths in which Ansible will search for Action Plugins.�[m action_plugins={{ ANSIBLE_HOME ~ "/plugins/action:/usr/share/ansible/plugins/action" }}�[m �[m # (boolean) When enabled, this option allows lookup plugins (whether used in variables as ``{{lookup('foo')}}`` or as a loop as with_foo) �[m�[7m>�[27m # By default, such data is marked as unsafe to prevent the templating engine from evaluating any jinja2 templating language, as this could�[m�[7m>�[27m allow_unsafe_lookups=False�[m �[m # (boolean) This controls whether an Ansible playbook should prompt for a login password. If using SSH keys for authentication, you probab�[m�[7m>�[27m ask_pass=False�[m :�[K�[H�[2J�[H�[H�[2J�[H[defaults]�[m # (boolean) By default Ansible will issue a warning when received from a task action (module or action plugin)�[m # These warnings can be silenced by adjusting this setting to False.�[m action_warnings=True�[m �[m # (list) Accept list of cowsay templates that are 'safe' to use, set to empty list if you want to enable all installed templates.�[m cowsay_enabled_stencils=bud-frogs, bunny, cheese, daemon, default, dragon, elephant-in-snake, elephant, eyes, hellokitty, kitty, luke-koal�[m�[7m>�[27m �[m # (string) Specify a custom cowsay path or swap in your cowsay implementation of choice�[m cowpath=�[m �[m # (string) This allows you to chose a specific cowsay stencil for the banners or use 'random' to cycle through them.�[m cow_selection=default�[m �[m # (boolean) This option forces color mode even when running without a TTY or the "nocolor" setting is True.�[m force_color=False�[m �[m # (path) The default root path for Ansible config files on the controller.�[m home=~/.ansible�[m �[m # (boolean) This setting allows suppressing colorizing output, which is used to give a better indication of failure and status information.�[m nocolor=False�[m �[m # (boolean) If you have cowsay installed but want to avoid the 'cows' (why????), use this.�[m nocows=False�[m �[m # (boolean) Sets the default value for the any_errors_fatal keyword, if True, Task failures will be considered fatal errors.�[m any_errors_fatal=False�[m �[m # (path) The password file to use for the become plugin. --become-password-file.�[m # If executable, it will be run and the resulting stdout will be used as the password.�[m become_password_file=�[m �[m # (pathspec) Colon separated paths in which Ansible will search for Become Plugins.�[m become_plugins={{ ANSIBLE_HOME ~ "/plugins/become:/usr/share/ansible/plugins/become" }}�[m �[m # (string) Chooses which cache plugin to use, the default 'memory' is ephemeral.�[m fact_caching=memory�[m �[m # (string) Defines connection or path information for the cache plugin�[m fact_caching_connection=�[m �[m # (string) Prefix to use for cache plugin files/tables�[m fact_caching_prefix=ansible_facts�[m �[m # (integer) Expiration timeout for the cache plugin data�[m fact_caching_timeout=86400�[m �[m # (list) List of enabled callbacks, not all callbacks need enabling, but many of those shipped with Ansible do as we don't want them activ�[m�[7m>�[27m callbacks_enabled=�[m �[m # (string) When a collection is loaded that does not support the running Ansible version (with the collection metadata key `requires_ansib�[m�[7m>�[27m collections_on_ansible_version_mismatch=warning�[m �[m # (pathspec) Colon separated paths in which Ansible will search for collections content. Collections must be in nested *subdirectories*, n�[m�[7m>�[27m �[m collections_path={{ ANSIBLE_HOME ~ "/collections:/usr/share/ansible/collections" }}�[m �[m # (boolean) A boolean to enable or disable scanning the sys.path for installed collections�[m collections_scan_sys_path=True�[m �[m # (path) The password file to use for the connection plugin. --connection-password-file.�[m connection_password_file=�[m �[m # (pathspec) Colon separated paths in which Ansible will search for Action Plugins.�[m action_plugins={{ ANSIBLE_HOME ~ "/plugins/action:/usr/share/ansible/plugins/action" }}�[m �[m # (boolean) When enabled, this option allows lookup plugins (whether used in variables as ``{{lookup('foo')}}`` or as a loop as with_foo) �[m�[7m>�[27m # By default, such data is marked as unsafe to prevent the templating engine from evaluating any jinja2 templating language, as this could�[m�[7m>�[27m allow_unsafe_lookups=False�[m �[m # (boolean) This controls whether an Ansible playbook should prompt for a login password. If using SSH keys for authentication, you probab�[m�[7m>�[27m ask_pass=False�[m :�[K��[H�[2J�[H�[H�[2J�[H[defaults]�[m # (boolean) By default Ansible will issue a warning when received from a task action (module or action plugin)�[m # These warnings can be silenced by adjusting this setting to False.�[m action_warnings=True�[m �[m # (list) Accept list of cowsay templates that are 'safe' to use, set to empty list if you want to enable all installed templates.�[m cowsay_enabled_stencils=bud-frogs, bunny, cheese, daemon, default, dragon, elephant-in-snake, elephant, eyes, hellokitty, kitty, luke-koal�[m�[7m>�[27m �[m # (string) Specify a custom cowsay path or swap in your cowsay implementation of choice�[m cowpath=�[m �[m # (string) This allows you to chose a specific cowsay stencil for the banners or use 'random' to cycle through them.�[m cow_selection=default�[m �[m # (boolean) This option forces color mode even when running without a TTY or the "nocolor" setting is True.�[m force_color=False�[m �[m # (path) The default root path for Ansible config files on the controller.�[m home=~/.ansible�[m �[m # (boolean) This setting allows suppressing colorizing output, which is used to give a better indication of failure and status information.�[m nocolor=False�[m �[m # (boolean) If you have cowsay installed but want to avoid the 'cows' (why????), use this.�[m nocows=False�[m �[m # (boolean) Sets the default value for the any_errors_fatal keyword, if True, Task failures will be considered fatal errors.�[m any_errors_fatal=False�[m �[m # (path) The password file to use for the become plugin. --become-password-file.�[m # If executable, it will be run and the resulting stdout will be used as the password.�[m become_password_file=�[m �[m # (pathspec) Colon separated paths in which Ansible will search for Become Plugins.�[m become_plugins={{ ANSIBLE_HOME ~ "/plugins/become:/usr/share/ansible/plugins/become" }}�[m �[m # (string) Chooses which cache plugin to use, the default 'memory' is ephemeral.�[m fact_caching=memory�[m �[m # (string) Defines connection or path information for the cache plugin�[m fact_caching_connection=�[m �[m # (string) Prefix to use for cache plugin files/tables�[m fact_caching_prefix=ansible_facts�[m �[m # (integer) Expiration timeout for the cache plugin data�[m fact_caching_timeout=86400�[m �[m # (list) List of enabled callbacks, not all callbacks need enabling, but many of those shipped with Ansible do as we don't want them activ�[m�[7m>�[27m callbacks_enabled=�[m �[m # (string) When a collection is loaded that does not support the running Ansible version (with the collection metadata key `requires_ansib�[m�[7m>�[27m collections_on_ansible_version_mismatch=warning�[m �[m # (pathspec) Colon separated paths in which Ansible will search for collections content. Collections must be in nested *subdirectories*, n�[m�[7m>�[27m �[m collections_path={{ ANSIBLE_HOME ~ "/collections:/usr/share/ansible/collections" }}�[m �[m # (boolean) A boolean to enable or disable scanning the sys.path for installed collections�[m collections_scan_sys_path=True�[m �[m # (path) The password file to use for the connection plugin. --connection-password-file.�[m connection_password_file=�[m �[m # (pathspec) Colon separated paths in which Ansible will search for Action Plugins.�[m action_plugins={{ ANSIBLE_HOME ~ "/plugins/action:/usr/share/ansible/plugins/action" }}�[m �[m # (boolean) When enabled, this option allows lookup plugins (whether used in variables as ``{{lookup('foo')}}`` or as a loop as with_foo) �[m�[7m>�[27m # By default, such data is marked as unsafe to prevent the templating engine from evaluating any jinja2 templating language, as this could�[m�[7m>�[27m allow_unsafe_lookups=False�[m �[m # (boolean) This controls whether an Ansible playbook should prompt for a login password. If using SSH keys for authentication, you probab�[m�[7m>�[27m ask_pass=False�[m :�[K
ADDITIONAL INFORMATION

I had fixed it at ansible/ansible-runner#1306

@xz-dev xz-dev added bug Researched, reproducible, committed to fix new New issues and PRs to triaged labels Sep 16, 2023
@ssbarnea ssbarnea added upstream and removed new New issues and PRs to triaged labels Sep 20, 2023
@cidrblock
Copy link
Collaborator

In the meantime, you can override the PAGER environment variable in the EE, which will allow the file to be written without any prompting:

ansible-navigator config init -m stdout --senv PAGER=cat > file.txt

(this could also be put in the navigator config file)

@cidrblock
Copy link
Collaborator

Let us know if this works for you, we could consider conditionally setting the environment variable by default for the user if we detect config init

BTW- is ee support is disabled the senv won't work, it would need to be done like this before the proc

PAGER=cat ansible-navigator config init -m stdout --ee false

@cidrblock cidrblock added waiting on author Additional information is needed form the author of the issue documentation Improvements or additions to documentation labels Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Researched, reproducible, committed to fix documentation Improvements or additions to documentation upstream waiting on author Additional information is needed form the author of the issue
Projects
Status: Roadmap
Development

No branches or pull requests

4 participants