cancel
Showing results for 
Search instead for 
Did you mean: 
huyvl3-fptcloud
Flight Engineer
Flight Engineer
  • 1,789 Views

don't understand Configuration "playbook-artifact"

Jump to solution

 

ansible-navigator:
  execution-environment:
    image: utility.lab.example.com/ee-supported-rhel8:latest
    pull:
      policy: missing
  playbook-artifact:
    enable: false

 

Hello, I don't quite understand what "playbook-artifact: enable: false" means. The lecture mentioned the following: "The enable section nested below the playbook-artifact section disables generating playbook artifacts when using the ansible-navigator run command. Playbook artifacts must be disabled when you require a prompt for a password when running a playbook." and does not have any examples. There is very little documentation online. Everyone has detailed and specific examples to describe the problem. Is it useful?

Labels (1)
2 Solutions

Accepted Solutions
Travis
Moderator
Moderator
  • 1,783 Views

@huyvl3-fptcloud -

Playbook artifacts create the JSON files (essentially artifacts of the entire playbook run with navigator). These JSON files can be reused to "replay" actions or they can be attached to Red Hat support tickets for help. Playbook artifacts can be configured to be on/off using true/false in the ansible-navigator.yml config file which controls the default behavior.

If you are running on the command line, using the ansible-navigator run command, you will be able to turn on/off using things like --pae false or --pae true which will turn it off or on respectively.

Why would you turn off PAE?

You would turn off PAE and playbook artifacts to run in STDOUT mode so that you can run certain callback plugins or so you can be prompted interactively for things like passwords or inputs if you are using things like vars_prompt. For certain Ansible functions where input comes from a user or for certain callback functions, this isn't supported in the ansible-navigator container TUI environment because it requires input from users which requires STDOUT and --pae false to be set in order to get that user input.

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training

View solution in original post

Travis
Moderator
Moderator
  • 1,759 Views

@huyvl3-fptcloud -

So the DO374 course explains this fairly well, but it isn't a JSON configuration, but more like a session log and detailed steps of exactly what was done as part of the ansible-navigator run command.

It allows you to replay a command is is most useful in troubleshooting.

https://github.com/ansible/ansible-navigator/blob/main/docs/faq.md

https://ansible.readthedocs.io/projects/navigator/settings/#subcommand-replay

https://ansible.readthedocs.io/projects/navigator/subcommands/#available-subcommands

You can look at ansible-navigator replay --help to read the on-system documentation and help items. Essentially it will perform an exact re-run of the playbook based on the ansible-navigator run command that created it.

https://levelupla.io/a-blazingly-fast-ansible-navigator-tutorial/ 

You can add these files to support tickets for Red Hat Engineers to gain insight into everything that happened with your playbook run and this provides them with almost all the information they could need to help you troubleshoot playbook and other issues as it is a complete capture of what Ansible ran.

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training

View solution in original post

4 Replies
Travis
Moderator
Moderator
  • 1,784 Views

@huyvl3-fptcloud -

Playbook artifacts create the JSON files (essentially artifacts of the entire playbook run with navigator). These JSON files can be reused to "replay" actions or they can be attached to Red Hat support tickets for help. Playbook artifacts can be configured to be on/off using true/false in the ansible-navigator.yml config file which controls the default behavior.

If you are running on the command line, using the ansible-navigator run command, you will be able to turn on/off using things like --pae false or --pae true which will turn it off or on respectively.

Why would you turn off PAE?

You would turn off PAE and playbook artifacts to run in STDOUT mode so that you can run certain callback plugins or so you can be prompted interactively for things like passwords or inputs if you are using things like vars_prompt. For certain Ansible functions where input comes from a user or for certain callback functions, this isn't supported in the ansible-navigator container TUI environment because it requires input from users which requires STDOUT and --pae false to be set in order to get that user input.

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training
huyvl3-fptcloud
Flight Engineer
Flight Engineer
  • 1,772 Views

Hi @Travis 

Thanks for the thoughtful answer.

What does the word "replay" mean to use what has already been generated so that we don't need to waste time generating the JSON configuration again? 

Furthermore, in what environment is this true/false value used? I mean the product development environment or has it been launched?

Travis
Moderator
Moderator
  • 1,760 Views

@huyvl3-fptcloud -

So the DO374 course explains this fairly well, but it isn't a JSON configuration, but more like a session log and detailed steps of exactly what was done as part of the ansible-navigator run command.

It allows you to replay a command is is most useful in troubleshooting.

https://github.com/ansible/ansible-navigator/blob/main/docs/faq.md

https://ansible.readthedocs.io/projects/navigator/settings/#subcommand-replay

https://ansible.readthedocs.io/projects/navigator/subcommands/#available-subcommands

You can look at ansible-navigator replay --help to read the on-system documentation and help items. Essentially it will perform an exact re-run of the playbook based on the ansible-navigator run command that created it.

https://levelupla.io/a-blazingly-fast-ansible-navigator-tutorial/ 

You can add these files to support tickets for Red Hat Engineers to gain insight into everything that happened with your playbook run and this provides them with almost all the information they could need to help you troubleshoot playbook and other issues as it is a complete capture of what Ansible ran.

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training
huyvl3-fptcloud
Flight Engineer
Flight Engineer
  • 1,757 Views

wow DO374... Thanks for letting me know. Maybe it's because I just started learning Ansible so I'm not sure how to approach the order of courses. I got it, that *.json file is like the body of a RESTful API request

Join the discussion
You must log in to join this conversation.