asyncdefrun_one_stdout(executor, executor_options):
""" Run a single playbook job with several hosts and echo the display output as it arrives """try:
job_def = AnsibleJobDef(data_dir='datadir', playbook='pb.yml')
job_status = await executor.submit_job(job_def, executor_options)
asyncfor line in job_status.stdout_lines:
print(line)
# directly await the job objectprint('*** directly awaiting the job status...')
await job_status
finally:
print('all done, exiting
% python example_subprocess_job.py
PLAY [taskhosts] ***************************************************************
TASK [Gathering Facts] *********************************************************
[WARNING]: Platform darwin on host h4 is using the discovered Python
interpreter at /usr/local/bin/python3.10, but future installation of another
Python interpreter could change the meaning of that path. See
https://docs.ansible.com/ansible-
core/2.13/reference_appendices/interpreter_discovery.html for more information.
ok: [h4]
[WARNING]: Platform darwin on host h2 is using the discovered Python
interpreter at /usr/local/bin/python3.10, but future installation of another
Python interpreter could change the meaning of that path. See
https://docs.ansible.com/ansible-
core/2.13/reference_appendices/interpreter_discovery.html for more information.
ok: [h2]
[WARNING]: Platform darwin on host h3 is using the discovered Python
interpreter at /usr/local/bin/python3.10, but future installation of another
Python interpreter could change the meaning of that path. See
https://docs.ansible.com/ansible-
core/2.13/reference_appendices/interpreter_discovery.html for more information.
ok: [h3]
[WARNING]: Platform darwin on host h1 is using the discovered Python
interpreter at /usr/local/bin/python3.10, but future installation of another
Python interpreter could change the meaning of that path. See
https://docs.ansible.com/ansible-
core/2.13/reference_appendices/interpreter_discovery.html for more information.
ok: [h1]
[WARNING]: Platform darwin on host h5 is using the discovered Python
interpreter at /usr/local/bin/python3.10, but future installation of another
Python interpreter could change the meaning of that path. See
https://docs.ansible.com/ansible-
core/2.13/reference_appendices/interpreter_discovery.html for more information.
ok: [h5]
TASK [ping] ********************************************************************
ok: [h5]
ok: [h2]
ok: [h3]
ok: [h4]
ok: [h1]
TASK [wait_for] ****************************************************************
ok: [h4]
ok: [h2]
ok: [h1]
ok: [h5]
ok: [h3]
TASK [shell] *******************************************************************
changed: [h4]
changed: [h3]
changed: [h5]
changed: [h2]
changed: [h1]
PLAY RECAP *********************************************************************
h1 : ok=4 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
h2 : ok=4 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
h3 : ok=4 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
h4 : ok=4 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
h5 : ok=4 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
*** directly awaiting the job status...
all done, exiting
■ Part 1: Getting Ansible Automation Platform Up and Running
AAP の概要や、複数のインストール方法、各種設定についての説明があるパートです。
Chapter 1: Introduction to Ansible Automation Platform
AAP の概要を紹介している章です。
Automation Controller(旧Ansible Tower)だけなく、Execution Environment、Automation Hub や Automation Service Catalog(APA2.2 でオンプレ化)、Red Hat Insights Red Hat Insights for Red Hat AAP、Ansible content tools(ansible-navigator、VS Code の拡張など) にも触れられています。
今回始めての PR 提出だったのですが、このリポジトリの仕組みとしては、初めての場合はCIを走らせるのに承認が必要でした。いざ承認されて CI が走ったら失敗しました。今回の私の修正とは無関係なようでした。レビュアーの方に rebase を指示されたので rebase して force push しました。CONTRIBUTING.md にも merge ではなく rebase でという旨の記述がありました。
We like to keep our commit history clean, and will require resubmission of pull requests that contain merge commits. Use git pull --rebase, rather than git pull, and git rebase, rather than git merge.