searchusermenu
  • 发布文章
  • 消息中心
点赞
收藏
评论
分享
原创

由ansible Debug日志分析ansible工作流程

2023-05-19 07:34:33
67
0

1、介绍

ansible是一款开源自动化平台,是一个配置管理工具,自动化运维工具

2、ansible的工作流程介绍

安装ansible:yum install -y ansible;

执行一条简单的shell指令:

ansible test -m shell -a "uname -a"
192.168.56.102 | CHANGED | rc=0 >>
Linux node1 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux


指令执行成功,回显中展示了指令执行的状态(rc=0)以及指令的执行结果;

打开ansible debug日志: export ANSIBLE_DEBUG=True,查看执行日志:

ansible test -m shell -a "uname -a"
9036 1684477395.22362: starting run
9036 1684477395.48599: Added group all to inventory
9036 1684477395.48626: Added group ungrouped to inventory
9036 1684477395.48697: Group all now contains ungrouped
9036 1684477395.48711: Examining possible inventory source: /etc/ansible/hosts
9036 1684477395.49429: trying /usr/share/ansible/plugins/cache
9036 1684477395.49434: trying /usr/lib/python2.7/site-packages/ansible/plugins/cache
9036 1684477395.49645: Loading CacheModule 'memory' from /usr/lib/python2.7/site-packages/ansible/plugins/cache/memory.py (searched paths: /usr/share/ansible/plugins/cache:/usr/lib/python2.7/site-packages/ansible/plugins/cache)
9036 1684477395.49813: trying /usr/share/ansible/plugins/inventory
9036 1684477395.49818: trying /usr/lib/python2.7/site-packages/ansible/plugins/inventory
9036 1684477395.50010: Loading InventoryModule 'host_list' from /usr/lib/python2.7/site-packages/ansible/plugins/inventory/host_list.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/inventory:/usr/share/ansible/plugins/inventory)
9036 1684477395.50179: Loaded config def from plugin (inventory/script)
9036 1684477395.50184: Loading InventoryModule 'script' from /usr/lib/python2.7/site-packages/ansible/plugins/inventory/script.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/inventory:/usr/share/ansible/plugins/inventory)
9036 1684477395.50224: Loading InventoryModule 'auto' from /usr/lib/python2.7/site-packages/ansible/plugins/inventory/auto.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/inventory:/usr/share/ansible/plugins/inventory)
9036 1684477395.50282: Loaded config def from plugin (inventory/yaml)
9036 1684477395.50285: Loading InventoryModule 'yaml' from /usr/lib/python2.7/site-packages/ansible/plugins/inventory/yaml.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/inventory:/usr/share/ansible/plugins/inventory)
9036 1684477395.50396: Loading InventoryModule 'ini' from /usr/lib/python2.7/site-packages/ansible/plugins/inventory/ini.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/inventory:/usr/share/ansible/plugins/inventory)
9036 1684477395.50448: Loading InventoryModule 'toml' from /usr/lib/python2.7/site-packages/ansible/plugins/inventory/toml.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/inventory:/usr/share/ansible/plugins/inventory)
9036 1684477395.50453: Attempting to use plugin host_list (/usr/lib/python2.7/site-packages/ansible/plugins/inventory/host_list.py)
9036 1684477395.50457: Attempting to use plugin script (/usr/lib/python2.7/site-packages/ansible/plugins/inventory/script.py)
9036 1684477395.50465: Attempting to use plugin auto (/usr/lib/python2.7/site-packages/ansible/plugins/inventory/auto.py)
9036 1684477395.50468: Attempting to use plugin yaml (/usr/lib/python2.7/site-packages/ansible/plugins/inventory/yaml.py)
9036 1684477395.50566: Loading data from /etc/ansible/hosts
9036 1684477395.50652: /etc/ansible/hosts was not parsable by yaml
9036 1684477395.50688: Attempting to use plugin ini (/usr/lib/python2.7/site-packages/ansible/plugins/inventory/ini.py)
9036 1684477395.50844: Added group test to inventory
9036 1684477395.50861: set inventory_file for 192.168.56.102
9036 1684477395.50865: set inventory_dir for 192.168.56.102
9036 1684477395.50866: Added host 192.168.56.102 to inventory
9036 1684477395.50869: Added host 192.168.56.102 to group test
9036 1684477395.50871: Reconcile groups and hosts in inventory.
9036 1684477395.50875: Group all now contains test
9036 1684477395.50883: Loading CacheModule 'memory' from /usr/lib/python2.7/site-packages/ansible/plugins/cache/memory.py (searched paths: /usr/share/ansible/plugins/cache:/usr/lib/python2.7/site-packages/ansible/plugins/cache) (found_in_cache=True, class_only=False)
9036 1684477395.53684: trying /usr/share/ansible/plugins/callback
9036 1684477395.53770: trying /usr/lib/python2.7/site-packages/ansible/plugins/callback
9036 1684477395.53966: Loading CallbackModule 'minimal' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/minimal.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback)
9036 1684477395.54641: trying /usr/share/ansible/plugins/doc_fragments
9036 1684477395.54646: trying /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments
9036 1684477395.54999: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments)
9036 1684477395.55156: Loaded config def from plugin (callback/actionable)
9036 1684477395.55169: Loading CallbackModule 'actionable' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/actionable.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.55226: Loading CallbackModule 'aws_resource_actions' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/aws_resource_actions.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.55377: Loaded config def from plugin (callback/cgroup_memory_recap)
9036 1684477395.55383: Loading CallbackModule 'cgroup_memory_recap' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/cgroup_memory_recap.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.55699: Loaded config def from plugin (callback/cgroup_perf_recap)
9036 1684477395.55704: Loading CallbackModule 'cgroup_perf_recap' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/cgroup_perf_recap.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.55739: Loading CallbackModule 'context_demo' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/context_demo.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.55775: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
9036 1684477395.55881: Loaded config def from plugin (callback/counter_enabled)
9036 1684477395.55886: Loading CallbackModule 'counter_enabled' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/counter_enabled.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.55936: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
9036 1684477395.56052: Loaded config def from plugin (callback/debug)
9036 1684477395.56057: Loading CallbackModule 'debug' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/debug.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.56091: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
9036 1684477395.56201: Loaded config def from plugin (callback/default)
9036 1684477395.56208: Loading CallbackModule 'default' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/default.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.56339: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
9036 1684477395.56454: Loaded config def from plugin (callback/dense)
9036 1684477395.56460: Loading CallbackModule 'dense' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/dense.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.56577: Loaded config def from plugin (callback/foreman)
9036 1684477395.56582: Loading CallbackModule 'foreman' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/foreman.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.56635: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
9036 1684477395.56723: Loaded config def from plugin (callback/full_skip)
9036 1684477395.56727: Loading CallbackModule 'full_skip' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/full_skip.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.58191: Loaded config def from plugin (callback/grafana_annotations)
9036 1684477395.58199: Loading CallbackModule 'grafana_annotations' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/grafana_annotations.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.58380: Loaded config def from plugin (callback/hipchat)
9036 1684477395.58388: Loading CallbackModule 'hipchat' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/hipchat.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.58499: Loaded config def from plugin (callback/jabber)
9036 1684477395.58507: Loading CallbackModule 'jabber' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/jabber.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.58603: Loaded config def from plugin (callback/json)
9036 1684477395.58607: Loading CallbackModule 'json' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/json.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.58743: Loaded config def from plugin (callback/junit)
9036 1684477395.58749: Loading CallbackModule 'junit' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/junit.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.58817: Loaded config def from plugin (callback/log_plays)
9036 1684477395.58821: Loading CallbackModule 'log_plays' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/log_plays.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.58921: Loaded config def from plugin (callback/logdna)
9036 1684477395.58926: Loading CallbackModule 'logdna' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/logdna.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.59061: Loaded config def from plugin (callback/logentries)
9036 1684477395.59072: Loading CallbackModule 'logentries' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/logentries.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.59126: Loaded config def from plugin (callback/logstash)
9036 1684477395.59129: Loading CallbackModule 'logstash' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/logstash.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.59271: Loaded config def from plugin (callback/mail)
9036 1684477395.59274: Loading CallbackModule 'mail' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/mail.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.59277: Loading CallbackModule 'minimal' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/minimal.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.59388: Loaded config def from plugin (callback/nrdp)
9036 1684477395.59392: Loading CallbackModule 'nrdp' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/nrdp.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.59417: Loading CallbackModule 'null' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/null.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.59442: Loading CallbackModule 'oneline' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/oneline.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.59536: Loading CallbackModule 'osx_say' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/osx_say.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.59558: Loading CallbackModule 'profile_roles' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/profile_roles.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.59605: Loaded config def from plugin (callback/profile_tasks)
9036 1684477395.59688: Loading CallbackModule 'profile_tasks' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/profile_tasks.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.59723: Loading CallbackModule 'say' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/say.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.59786: Loaded config def from plugin (callback/selective)
9036 1684477395.59789: Loading CallbackModule 'selective' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/selective.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.59835: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
9036 1684477395.59974: Loaded config def from plugin (callback/skippy)
9036 1684477395.59985: Loading CallbackModule 'skippy' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/skippy.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.60324: Loaded config def from plugin (callback/slack)
9036 1684477395.60340: Loading CallbackModule 'slack' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/slack.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.60474: Loaded config def from plugin (callback/splunk)
9036 1684477395.60489: Loading CallbackModule 'splunk' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/splunk.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.60574: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
9036 1684477395.60907: Loaded config def from plugin (callback/stderr)
9036 1684477395.60918: Loading CallbackModule 'stderr' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/stderr.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.61063: Loaded config def from plugin (callback/sumologic)
9036 1684477395.61073: Loading CallbackModule 'sumologic' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/sumologic.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.61353: Loaded config def from plugin (callback/syslog_json)
9036 1684477395.61357: Loading CallbackModule 'syslog_json' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/syslog_json.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.61376: Loading CallbackModule 'timer' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/timer.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.61458: Loading CallbackModule 'tree' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/tree.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.61530: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
9036 1684477395.61737: Loaded config def from plugin (callback/unixy)
9036 1684477395.61749: Loading CallbackModule 'unixy' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/unixy.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.61857: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
9036 1684477395.62059: Loaded config def from plugin (callback/yaml)
9036 1684477395.62066: Loading CallbackModule 'yaml' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/yaml.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.62131: in VariableManager get_vars()
9036 1684477395.62429: done with get_vars()
9036 1684477395.65471: trying /usr/share/ansible/plugins/strategy
9036 1684477395.65500: trying /usr/lib/python2.7/site-packages/ansible/plugins/strategy
9036 1684477395.65533: Loading StrategyModule 'linear' from /usr/lib/python2.7/site-packages/ansible/plugins/strategy/linear.py (searched paths: /usr/share/ansible/plugins/strategy:/usr/lib/python2.7/site-packages/ansible/plugins/strategy)
9036 1684477395.65697: getting the remaining hosts for this loop
9036 1684477395.65702: done getting the remaining hosts for this loop
9036 1684477395.65711: building list of next tasks for hosts
9036 1684477395.65713: getting the next task for host 192.168.56.102
9036 1684477395.65717: done getting next task for host 192.168.56.102
9036 1684477395.65720:  ^ task is: TASK: meta (flush_handlers)
9036 1684477395.65723:  ^ state is: HOST STATE: block=1, task=1, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
9036 1684477395.65724: done building task lists
9036 1684477395.65725: counting tasks in each state of execution
9036 1684477395.65727: done counting tasks in each state of execution:
    num_setups: 0
    num_tasks: 1
    num_rescue: 0
    num_always: 0
9036 1684477395.65729: advancing hosts in ITERATING_TASKS
9036 1684477395.65730: starting to advance hosts
9036 1684477395.65732: getting the next task for host 192.168.56.102
9036 1684477395.65734: done getting next task for host 192.168.56.102
9036 1684477395.65736:  ^ task is: TASK: meta (flush_handlers)
9036 1684477395.65737:  ^ state is: HOST STATE: block=1, task=1, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
9036 1684477395.65739: done advancing hosts to next task
9036 1684477395.66070: trying /usr/share/ansible/plugins/action
9036 1684477395.66080: trying /usr/lib/python2.7/site-packages/ansible/plugins/action
9036 1684477395.66543: done queuing things up, now waiting for results queue to drain
9036 1684477395.66553: results queue empty
9036 1684477395.66558: checking for any_errors_fatal
9036 1684477395.66564: done checking for any_errors_fatal
9036 1684477395.66568: checking for max_fail_percentage
9036 1684477395.66571: done checking for max_fail_percentage
9036 1684477395.66575: checking to see if all hosts have failed and the running result is not ok
9036 1684477395.66578: done checking to see if all hosts have failed
9036 1684477395.66581: getting the remaining hosts for this loop
9036 1684477395.66585: done getting the remaining hosts for this loop
9036 1684477395.66593: building list of next tasks for hosts
9036 1684477395.66596: getting the next task for host 192.168.56.102
9036 1684477395.66604: done getting next task for host 192.168.56.102
9036 1684477395.66613:  ^ task is: TASK: shell
9036 1684477395.66617:  ^ state is: HOST STATE: block=2, task=1, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
9036 1684477395.66620: done building task lists
9036 1684477395.66622: counting tasks in each state of execution
9036 1684477395.66625: done counting tasks in each state of execution:
    num_setups: 0
    num_tasks: 1
    num_rescue: 0
    num_always: 0
9036 1684477395.66628: advancing hosts in ITERATING_TASKS
9036 1684477395.66631: starting to advance hosts
9036 1684477395.66633: getting the next task for host 192.168.56.102
9036 1684477395.66637: done getting next task for host 192.168.56.102
9036 1684477395.66642:  ^ task is: TASK: shell
9036 1684477395.66645:  ^ state is: HOST STATE: block=2, task=1, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
9036 1684477395.66648: done advancing hosts to next task
9036 1684477395.66687: Loading ActionModule 'shell' from /usr/lib/python2.7/site-packages/ansible/plugins/action/shell.py (searched paths: /usr/share/ansible/plugins/action:/usr/lib/python2.7/site-packages/ansible/plugins/action) (found_in_cache=False, class_only=True)
9036 1684477395.66698: getting variables
9036 1684477395.66722: in VariableManager get_vars()
9036 1684477395.66752: Calling all_inventory to load vars for 192.168.56.102
9036 1684477395.66760: Calling groups_inventory to load vars for 192.168.56.102
9036 1684477395.66767: Calling all_plugins_inventory to load vars for 192.168.56.102
9036 1684477395.66877: Loading VarsModule 'host_group_vars' from /usr/lib/python2.7/site-packages/ansible/plugins/vars/host_group_vars.py
9036 1684477395.66901: Calling all_plugins_play to load vars for 192.168.56.102
9036 1684477395.66921: Loading VarsModule 'host_group_vars' from /usr/lib/python2.7/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
9036 1684477395.66938: Calling groups_plugins_inventory to load vars for 192.168.56.102
9036 1684477395.66955: Loading VarsModule 'host_group_vars' from /usr/lib/python2.7/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
9036 1684477395.66969: Calling groups_plugins_play to load vars for 192.168.56.102
9036 1684477395.66997: Loading VarsModule 'host_group_vars' from /usr/lib/python2.7/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
9036 1684477395.67101: Loading VarsModule 'host_group_vars' from /usr/lib/python2.7/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
9036 1684477395.67281: Loading VarsModule 'host_group_vars' from /usr/lib/python2.7/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
9036 1684477395.68266: done with get_vars()
9036 1684477395.68699: done getting variables
9036 1684477395.68771: sending task start callback, copying the task so we can template it temporarily
9036 1684477395.68789: done copying, going to template now
9036 1684477395.68798: done templating
9036 1684477395.68800: here goes the callback...
9036 1684477395.68823: sending task start callback
9036 1684477395.68830: entering _queue_task() for 192.168.56.102/shell
9036 1684477395.68850: Creating lock for shell
9036 1684477395.69850: worker is 1 (out of 1 available)
9036 1684477395.69919: exiting _queue_task() for 192.168.56.102/shell
9036 1684477395.70029: done queuing things up, now waiting for results queue to drain
9036 1684477395.70047: waiting for pending results...
9044 1684477395.70248: running TaskExecutor() for 192.168.56.102/TASK: shell
9044 1684477395.70399: in run() - task 08002774-754f-3081-672e-000000000009
9044 1684477395.70482: calling self._execute()
9044 1684477395.71840: trying /usr/share/ansible/plugins/connection
9044 1684477395.71858: trying /usr/lib/python2.7/site-packages/ansible/plugins/connection
9044 1684477395.73410: Loaded config def from plugin (connection/ssh)
9044 1684477395.73420: Loading Connection 'ssh' from /usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/connection:/usr/share/ansible/plugins/connection)
9044 1684477395.73454: trying /usr/lib/python2.7/site-packages/ansible/plugins/shell
9044 1684477395.73623: Loading ModuleDocFragment 'shell_common' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/shell_common.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments)
9044 1684477395.73838: Loaded config def from plugin (shell/sh)
9044 1684477395.73842: Loading ShellModule 'sh' from /usr/lib/python2.7/site-packages/ansible/plugins/shell/sh.py
9044 1684477395.73845: Loading ShellModule 'sh' from /usr/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
9044 1684477395.74044: Loading ActionModule 'shell' from /usr/lib/python2.7/site-packages/ansible/plugins/action/shell.py (searched paths: /usr/share/ansible/plugins/action:/usr/lib/python2.7/site-packages/ansible/plugins/action) (found_in_cache=True, class_only=False)
9044 1684477395.74052: starting attempt loop
9044 1684477395.74054: running the handler
9044 1684477395.74073: Loading ActionModule 'command' from /usr/lib/python2.7/site-packages/ansible/plugins/action/command.py (searched paths: /usr/share/ansible/plugins/action:/usr/lib/python2.7/site-packages/ansible/plugins/action)
9044 1684477395.74080: _low_level_execute_command(): starting
9044 1684477395.74084: _low_level_execute_command(): executing: /bin/sh -c 'echo ~ && sleep 0'
9044 1684477395.80291: stdout chunk (state=2):
>>>/root
<<<
9044 1684477395.80595: stdout chunk (state=3):
>>><<<
9044 1684477395.80603: stderr chunk (state=3):
>>><<<
9044 1684477395.80616: _low_level_execute_command() done: rc=0, stdout=/root
, stderr=
9044 1684477395.80627: _low_level_execute_command(): starting
9044 1684477395.80633: _low_level_execute_command(): executing: /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/ansible-tmp-1684477395.81-9044-262581187543020 `" && echo ansible-tmp-1684477395.81-9044-262581187543020="` echo /root/.ansible/tmp/ansible-tmp-1684477395.81-9044-262581187543020 `" ) && sleep 0'
9044 1684477395.85421: stdout chunk (state=2):
>>>ansible-tmp-1684477395.81-9044-262581187543020=/root/.ansible/tmp/ansible-tmp-1684477395.81-9044-262581187543020
<<<
9044 1684477395.86758: stdout chunk (state=3):
>>><<<
9044 1684477395.86766: stderr chunk (state=3):
>>><<<
9044 1684477395.86784: _low_level_execute_command() done: rc=0, stdout=ansible-tmp-1684477395.81-9044-262581187543020=/root/.ansible/tmp/ansible-tmp-1684477395.81-9044-262581187543020
, stderr=
9044 1684477395.91537: trying /usr/share/ansible/plugins/modules
9044 1684477395.91550: trying /usr/lib/python2.7/site-packages/ansible/modules
9044 1684477395.91562: trying /usr/lib/python2.7/site-packages/ansible/modules/cloud
9044 1684477395.91577: trying /usr/lib/python2.7/site-packages/ansible/modules/clustering
9044 1684477395.91592: trying /usr/lib/python2.7/site-packages/ansible/modules/commands
9044 1684477395.91693: ANSIBALLZ: Using generic lock for command
9044 1684477395.91700: ANSIBALLZ: Acquiring lock
9044 1684477395.91709: ANSIBALLZ: Lock acquired: 139910940766736
9044 1684477395.91716: ANSIBALLZ: Creating module
9044 1684477396.03028: ANSIBALLZ: Writing module into payload
9044 1684477396.03305: ANSIBALLZ: Writing module
9044 1684477396.03356: ANSIBALLZ: Renaming module
9044 1684477396.03378: ANSIBALLZ: Done creating module
9044 1684477396.03549: _low_level_execute_command(): starting
9044 1684477396.03571: _low_level_execute_command(): executing: /bin/sh -c 'echo PLATFORM; uname; echo FOUND; command -v '"'"'/usr/bin/python'"'"'; command -v '"'"'python3.7'"'"'; command -v '"'"'python3.6'"'"'; command -v '"'"'python3.5'"'"'; command -v '"'"'python2.7'"'"'; command -v '"'"'python2.6'"'"'; command -v '"'"'/usr/libexec/platform-python'"'"'; command -v '"'"'/usr/bin/python3'"'"'; command -v '"'"'python'"'"'; echo ENDFOUND && sleep 0'
9044 1684477396.08591: stdout chunk (state=2):
>>>PLATFORM
<<<
9044 1684477396.09902: stdout chunk (state=3):
>>>Linux
<<<
9044 1684477396.10332: stdout chunk (state=3):
>>>FOUND
/usr/bin/python
/usr/bin/python3.6
/usr/bin/python2.7
/usr/libexec/platform-python
/usr/bin/python3
/usr/bin/python
ENDFOUND
<<<
9044 1684477396.11238: stdout chunk (state=3):
>>><<<
9044 1684477396.11247: stderr chunk (state=3):
>>><<<
9044 1684477396.11263: _low_level_execute_command() done: rc=0, stdout=PLATFORM
Linux
FOUND
/usr/bin/python
/usr/bin/python3.6
/usr/bin/python2.7
/usr/libexec/platform-python
/usr/bin/python3
/usr/bin/python
ENDFOUND
, stderr=
9044 1684477396.11271 [192.168.56.102]: found interpreters: [u'/usr/bin/python', u'/usr/bin/python3.6', u'/usr/bin/python2.7', u'/usr/libexec/platform-python', u'/usr/bin/python3', u'/usr/bin/python']
9044 1684477396.11328: _low_level_execute_command(): starting
9044 1684477396.11338: _low_level_execute_command(): executing: /bin/sh -c '/usr/bin/python && sleep 0'
9044 1684477396.12164: Sending initial data
9044 1684477396.12198: Sent initial data (1234 bytes)
9044 1684477396.19427: stdout chunk (state=3):
>>>{"osrelease_content": "NAME=\"CentOS Linux\"\nVERSION=\"7 (Core)\"\nID=\"centos\"\nID_LIKE=\"rhel fedora\"\nVERSION_ID=\"7\"\nPRETTY_NAME=\"CentOS Linux 7 (Core)\"\nANSI_COLOR=\"0;31\"\nCPE_NAME=\"cpe:/o:centos:centos:7\"\nHOME_URL=\"https://www.centos.org/\"\nBUG_REPORT_URL=\"https://bugs.centos.org/\"\n\nCENTOS_MANTISBT_PROJECT=\"CentOS-7\"\nCENTOS_MANTISBT_PROJECT_VERSION=\"7\"\nREDHAT_SUPPORT_PRODUCT=\"centos\"\nREDHAT_SUPPORT_PRODUCT_VERSION=\"7\"\n\n", "platform_dist_result": ["centos", "7.9.2009", "Core"]}
<<<
9044 1684477396.20045: stdout chunk (state=3):
>>><<<
9044 1684477396.20085: stderr chunk (state=3):
>>><<<
9044 1684477396.20099: _low_level_execute_command() done: rc=0, stdout={"osrelease_content": "NAME=\"CentOS Linux\"\nVERSION=\"7 (Core)\"\nID=\"centos\"\nID_LIKE=\"rhel fedora\"\nVERSION_ID=\"7\"\nPRETTY_NAME=\"CentOS Linux 7 (Core)\"\nANSI_COLOR=\"0;31\"\nCPE_NAME=\"cpe:/o:centos:centos:7\"\nHOME_URL=\"https://www.centos.org/\"\nBUG_REPORT_URL=\"https://bugs.centos.org/\"\n\nCENTOS_MANTISBT_PROJECT=\"CentOS-7\"\nCENTOS_MANTISBT_PROJECT_VERSION=\"7\"\nREDHAT_SUPPORT_PRODUCT=\"centos\"\nREDHAT_SUPPORT_PRODUCT_VERSION=\"7\"\n\n", "platform_dist_result": ["centos", "7.9.2009", "Core"]}
, stderr=
9044 1684477396.20142: ANSIBALLZ: using cached module: /root/.ansible/tmp/ansible-local-903604p49G/ansiballz_cache/command-ZIP_DEFLATED
9044 1684477396.20456: transferring module to remote /root/.ansible/tmp/ansible-tmp-1684477395.81-9044-262581187543020/AnsiballZ_command.py
9044 1684477396.21321: Sending initial data
9044 1684477396.21397: Sent initial data (145 bytes)
9044 1684477396.27467: stdout chunk (state=3):
>>>sftp> put /root/.ansible/tmp/ansible-local-903604p49G/tmpI4poN6 /root/.ansible/tmp/ansible-tmp-1684477395.81-9044-262581187543020/AnsiballZ_command.py
<<<
9044 1684477396.29181: stdout chunk (state=3):
>>><<<
9044 1684477396.29195: stderr chunk (state=3):
>>><<<
9044 1684477396.29214: done transferring module to remote
9044 1684477396.29228: _low_level_execute_command(): starting
9044 1684477396.29233: _low_level_execute_command(): executing: /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1684477395.81-9044-262581187543020/ /root/.ansible/tmp/ansible-tmp-1684477395.81-9044-262581187543020/AnsiballZ_command.py && sleep 0'
9044 1684477396.32931: stdout chunk (state=2):
>>><<<
9044 1684477396.32958: stderr chunk (state=2):
>>><<<
9044 1684477396.33022: _low_level_execute_command() done: rc=0, stdout=, stderr=
9044 1684477396.33030: _low_level_execute_command(): starting
9044 1684477396.33044: _low_level_execute_command(): executing: /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1684477395.81-9044-262581187543020/AnsiballZ_command.py && sleep 0'
9044 1684477396.53936: stdout chunk (state=2):
>>>
{"changed": true, "end": "2023-05-19 14:23:16.525820", "stdout": "Linux node1 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux", "cmd": "uname -a", "rc": 0, "start": "2023-05-19 14:23:16.515751", "stderr": "", "delta": "0:00:00.010069", "invocation": {"module_args": {"creates": null, "executable": null, "_uses_shell": true, "strip_empty_ends": true, "_raw_params": "uname -a", "removes": null, "argv": null, "warn": true, "chdir": null, "stdin_add_newline": true, "stdin": null}}}
<<<
9044 1684477396.54602: stderr chunk (state=3):
>>>Shared connection to 192.168.56.102 closed.
<<<
9044 1684477396.54620: stderr chunk (state=3):
>>><<<
9044 1684477396.54624: stdout chunk (state=3):
>>><<<
9044 1684477396.54643: _low_level_execute_command() done: rc=0, stdout=
{"changed": true, "end": "2023-05-19 14:23:16.525820", "stdout": "Linux node1 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux", "cmd": "uname -a", "rc": 0, "start": "2023-05-19 14:23:16.515751", "stderr": "", "delta": "0:00:00.010069", "invocation": {"module_args": {"creates": null, "executable": null, "_uses_shell": true, "strip_empty_ends": true, "_raw_params": "uname -a", "removes": null, "argv": null, "warn": true, "chdir": null, "stdin_add_newline": true, "stdin": null}}}
, stderr=Shared connection to 192.168.56.102 closed.
9044 1684477396.54843: done with _execute_module (command, {'_ansible_version': '2.9.27', '_ansible_socket': None, '_ansible_remote_tmp': u'~/.ansible/tmp', '_uses_shell': True, '_ansible_no_log': False, '_ansible_module_name': 'command', u'_raw_params': u'uname -a', '_ansible_verbosity': 0, '_ansible_keep_remote_files': False, '_ansible_syslog_facility': u'LOG_USER', 'warn': True, '_ansible_string_conversion_action': u'warn', '_ansible_selinux_special_fs': ['fuse', 'nfs', 'vboxsf', 'ramfs', '9p', 'vfat'], '_ansible_diff': False, '_ansible_debug': True, '_ansible_shell_executable': u'/bin/sh', '_ansible_check_mode': False, '_ansible_tmpdir': u'/root/.ansible/tmp/ansible-tmp-1684477395.81-9044-262581187543020/'})
9044 1684477396.54855: _low_level_execute_command(): starting
9044 1684477396.54861: _low_level_execute_command(): executing: /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1684477395.81-9044-262581187543020/ > /dev/null 2>&1 && sleep 0'
9044 1684477396.59946: stdout chunk (state=2):
>>><<<
9044 1684477396.59962: stderr chunk (state=2):
>>><<<
9044 1684477396.59978: _low_level_execute_command() done: rc=0, stdout=, stderr=
9044 1684477396.60011: handler run complete
9044 1684477396.60374: attempt loop complete, returning result
9044 1684477396.60387: _execute() done
9044 1684477396.60393: dumping result to json
9044 1684477396.60401: done dumping result, returning
9044 1684477396.60919: done running TaskExecutor() for 192.168.56.102/TASK: command [08002774-754f-3081-672e-000000000009]
9044 1684477396.60939: sending task result for task 08002774-754f-3081-672e-000000000009
9044 1684477396.61443: done sending task result for task 08002774-754f-3081-672e-000000000009
9044 1684477396.61689: WORKER PROCESS EXITING
192.168.56.102 | CHANGED | rc=0 >>
Linux node1 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
9036 1684477396.62097: no more pending results, returning what we have
9036 1684477396.62100: results queue empty
9036 1684477396.62101: checking for any_errors_fatal
9036 1684477396.62103: done checking for any_errors_fatal
9036 1684477396.62104: checking for max_fail_percentage
9036 1684477396.62106: done checking for max_fail_percentage
9036 1684477396.62107: checking to see if all hosts have failed and the running result is not ok
9036 1684477396.62108: done checking to see if all hosts have failed
9036 1684477396.62110: getting the remaining hosts for this loop
9036 1684477396.62111: done getting the remaining hosts for this loop
9036 1684477396.62116: building list of next tasks for hosts
9036 1684477396.62118: getting the next task for host 192.168.56.102
9036 1684477396.62121: done getting next task for host 192.168.56.102
9036 1684477396.62124:  ^ task is: TASK: meta (flush_handlers)
9036 1684477396.62126:  ^ state is: HOST STATE: block=3, task=1, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
9036 1684477396.62127: done building task lists
9036 1684477396.62129: counting tasks in each state of execution
9036 1684477396.62130: done counting tasks in each state of execution:
    num_setups: 0
    num_tasks: 1
    num_rescue: 0
    num_always: 0
9036 1684477396.62132: advancing hosts in ITERATING_TASKS
9036 1684477396.62133: starting to advance hosts
9036 1684477396.62135: getting the next task for host 192.168.56.102
9036 1684477396.62137: done getting next task for host 192.168.56.102
9036 1684477396.62139:  ^ task is: TASK: meta (flush_handlers)
9036 1684477396.62140:  ^ state is: HOST STATE: block=3, task=1, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
9036 1684477396.62142: done advancing hosts to next task
9036 1684477396.62156: done queuing things up, now waiting for results queue to drain
9036 1684477396.62163: results queue empty
9036 1684477396.62165: checking for any_errors_fatal
9036 1684477396.62168: done checking for any_errors_fatal
9036 1684477396.62170: checking for max_fail_percentage
9036 1684477396.62171: done checking for max_fail_percentage
9036 1684477396.62172: checking to see if all hosts have failed and the running result is not ok
9036 1684477396.62173: done checking to see if all hosts have failed
9036 1684477396.62174: getting the remaining hosts for this loop
9036 1684477396.62176: done getting the remaining hosts for this loop
9036 1684477396.62180: building list of next tasks for hosts
9036 1684477396.62181: getting the next task for host 192.168.56.102
9036 1684477396.62183: done getting next task for host 192.168.56.102
9036 1684477396.62186:  ^ task is: TASK: meta (flush_handlers)
9036 1684477396.62187:  ^ state is: HOST STATE: block=4, task=1, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
9036 1684477396.62189: done building task lists
9036 1684477396.62190: counting tasks in each state of execution
9036 1684477396.62191: done counting tasks in each state of execution:
    num_setups: 0
    num_tasks: 1
    num_rescue: 0
    num_always: 0
9036 1684477396.62193: advancing hosts in ITERATING_TASKS
9036 1684477396.62194: starting to advance hosts
9036 1684477396.62195: getting the next task for host 192.168.56.102
9036 1684477396.62197: done getting next task for host 192.168.56.102
9036 1684477396.62199:  ^ task is: TASK: meta (flush_handlers)
9036 1684477396.62201:  ^ state is: HOST STATE: block=4, task=1, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
9036 1684477396.62202: done advancing hosts to next task
9036 1684477396.62208: done queuing things up, now waiting for results queue to drain
9036 1684477396.62210: results queue empty
9036 1684477396.62211: checking for any_errors_fatal
9036 1684477396.62213: done checking for any_errors_fatal
9036 1684477396.62214: checking for max_fail_percentage
9036 1684477396.62215: done checking for max_fail_percentage
9036 1684477396.62216: checking to see if all hosts have failed and the running result is not ok
9036 1684477396.62217: done checking to see if all hosts have failed
9036 1684477396.62218: getting the remaining hosts for this loop
9036 1684477396.62220: done getting the remaining hosts for this loop
9036 1684477396.62224: building list of next tasks for hosts
9036 1684477396.62226: getting the next task for host 192.168.56.102
9036 1684477396.62228: done getting next task for host 192.168.56.102
9036 1684477396.62230:  ^ task is: None
9036 1684477396.62232:  ^ state is: HOST STATE: block=5, task=0, rescue=0, always=0, run_state=ITERATING_COMPLETE, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
9036 1684477396.62281: done building task lists
9036 1684477396.62285: counting tasks in each state of execution
9036 1684477396.62287: done counting tasks in each state of execution:
    num_setups: 0
    num_tasks: 0
    num_rescue: 0
    num_always: 0
9036 1684477396.62288: all hosts are done, so returning None's for all hosts
9036 1684477396.62290: done queuing things up, now waiting for results queue to drain
9036 1684477396.62292: results queue empty
9036 1684477396.62293: checking for any_errors_fatal
9036 1684477396.62294: done checking for any_errors_fatal
9036 1684477396.62295: checking for max_fail_percentage
9036 1684477396.62296: done checking for max_fail_percentage
9036 1684477396.62297: checking to see if all hosts have failed and the running result is not ok
9036 1684477396.62298: done checking to see if all hosts have failed
9036 1684477396.62300: getting the next task for host 192.168.56.102
9036 1684477396.62303: done getting next task for host 192.168.56.102
9036 1684477396.62304:  ^ task is: None
9036 1684477396.62305:  ^ state is: HOST STATE: block=5, task=0, rescue=0, always=0, run_state=ITERATING_COMPLETE, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
9036 1684477396.62307: running handlers
9036 1684477396.62411: RUNNING CLEANUP


在debug日志中我们可以看出,ansible主要的执行流程有:

  • 获取inventory: 即读取用户输入的host文件(ansible -i hosts)或者默认的/etc/ansible/hosts文件,从而获取到用户输入的指令需要在哪些物理机器上执行;
  • 加载plugins目录下的所有的插件;
  • 获取用户输入的参数(如果有);
  • 获取指令执行的策略(linear或者free),默认为linear;linear 策略即线性执行策略。线性执行策略指主机组内所有主机完成一个任务后才继续下一个任务的执行。free 策略即自由策略,即在一个 play 执行完之前,每个主机都各顾各的尽可能快的完成 play 里的所有任务,而不会因为其他主机没执行完任务而等待;
  • 将要执行的指令作为一个任务加入到任务队列,任务真正的执行阶段通过迭代任务队列获取下一个需要执行的任务;
  • 执行任务:ansible中执行某个指令并不是直接将指令发到远端去执行(因为要兼容不同的平台),而是将指令和ansible的模板脚本(python脚本)打包一起发到要执行的节点,解压并import需要的包,获取当前平台的python版本(interpreters),执行python脚本(low_level_execute_command(): executing: /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1684477395.81-9044-262581187543020/ /root/.ansible/tmp/ansible-tmp-1684477395.81-9044-262581187543020/AnsiballZ_command.py && sleep 0'),获取执行结果,然后清理现场之后返回;
0条评论
0 / 1000
l****n
3文章数
0粉丝数
l****n
3 文章 | 0 粉丝
原创

由ansible Debug日志分析ansible工作流程

2023-05-19 07:34:33
67
0

1、介绍

ansible是一款开源自动化平台,是一个配置管理工具,自动化运维工具

2、ansible的工作流程介绍

安装ansible:yum install -y ansible;

执行一条简单的shell指令:

ansible test -m shell -a "uname -a"
192.168.56.102 | CHANGED | rc=0 >>
Linux node1 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux


指令执行成功,回显中展示了指令执行的状态(rc=0)以及指令的执行结果;

打开ansible debug日志: export ANSIBLE_DEBUG=True,查看执行日志:

ansible test -m shell -a "uname -a"
9036 1684477395.22362: starting run
9036 1684477395.48599: Added group all to inventory
9036 1684477395.48626: Added group ungrouped to inventory
9036 1684477395.48697: Group all now contains ungrouped
9036 1684477395.48711: Examining possible inventory source: /etc/ansible/hosts
9036 1684477395.49429: trying /usr/share/ansible/plugins/cache
9036 1684477395.49434: trying /usr/lib/python2.7/site-packages/ansible/plugins/cache
9036 1684477395.49645: Loading CacheModule 'memory' from /usr/lib/python2.7/site-packages/ansible/plugins/cache/memory.py (searched paths: /usr/share/ansible/plugins/cache:/usr/lib/python2.7/site-packages/ansible/plugins/cache)
9036 1684477395.49813: trying /usr/share/ansible/plugins/inventory
9036 1684477395.49818: trying /usr/lib/python2.7/site-packages/ansible/plugins/inventory
9036 1684477395.50010: Loading InventoryModule 'host_list' from /usr/lib/python2.7/site-packages/ansible/plugins/inventory/host_list.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/inventory:/usr/share/ansible/plugins/inventory)
9036 1684477395.50179: Loaded config def from plugin (inventory/script)
9036 1684477395.50184: Loading InventoryModule 'script' from /usr/lib/python2.7/site-packages/ansible/plugins/inventory/script.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/inventory:/usr/share/ansible/plugins/inventory)
9036 1684477395.50224: Loading InventoryModule 'auto' from /usr/lib/python2.7/site-packages/ansible/plugins/inventory/auto.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/inventory:/usr/share/ansible/plugins/inventory)
9036 1684477395.50282: Loaded config def from plugin (inventory/yaml)
9036 1684477395.50285: Loading InventoryModule 'yaml' from /usr/lib/python2.7/site-packages/ansible/plugins/inventory/yaml.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/inventory:/usr/share/ansible/plugins/inventory)
9036 1684477395.50396: Loading InventoryModule 'ini' from /usr/lib/python2.7/site-packages/ansible/plugins/inventory/ini.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/inventory:/usr/share/ansible/plugins/inventory)
9036 1684477395.50448: Loading InventoryModule 'toml' from /usr/lib/python2.7/site-packages/ansible/plugins/inventory/toml.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/inventory:/usr/share/ansible/plugins/inventory)
9036 1684477395.50453: Attempting to use plugin host_list (/usr/lib/python2.7/site-packages/ansible/plugins/inventory/host_list.py)
9036 1684477395.50457: Attempting to use plugin script (/usr/lib/python2.7/site-packages/ansible/plugins/inventory/script.py)
9036 1684477395.50465: Attempting to use plugin auto (/usr/lib/python2.7/site-packages/ansible/plugins/inventory/auto.py)
9036 1684477395.50468: Attempting to use plugin yaml (/usr/lib/python2.7/site-packages/ansible/plugins/inventory/yaml.py)
9036 1684477395.50566: Loading data from /etc/ansible/hosts
9036 1684477395.50652: /etc/ansible/hosts was not parsable by yaml
9036 1684477395.50688: Attempting to use plugin ini (/usr/lib/python2.7/site-packages/ansible/plugins/inventory/ini.py)
9036 1684477395.50844: Added group test to inventory
9036 1684477395.50861: set inventory_file for 192.168.56.102
9036 1684477395.50865: set inventory_dir for 192.168.56.102
9036 1684477395.50866: Added host 192.168.56.102 to inventory
9036 1684477395.50869: Added host 192.168.56.102 to group test
9036 1684477395.50871: Reconcile groups and hosts in inventory.
9036 1684477395.50875: Group all now contains test
9036 1684477395.50883: Loading CacheModule 'memory' from /usr/lib/python2.7/site-packages/ansible/plugins/cache/memory.py (searched paths: /usr/share/ansible/plugins/cache:/usr/lib/python2.7/site-packages/ansible/plugins/cache) (found_in_cache=True, class_only=False)
9036 1684477395.53684: trying /usr/share/ansible/plugins/callback
9036 1684477395.53770: trying /usr/lib/python2.7/site-packages/ansible/plugins/callback
9036 1684477395.53966: Loading CallbackModule 'minimal' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/minimal.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback)
9036 1684477395.54641: trying /usr/share/ansible/plugins/doc_fragments
9036 1684477395.54646: trying /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments
9036 1684477395.54999: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments)
9036 1684477395.55156: Loaded config def from plugin (callback/actionable)
9036 1684477395.55169: Loading CallbackModule 'actionable' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/actionable.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.55226: Loading CallbackModule 'aws_resource_actions' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/aws_resource_actions.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.55377: Loaded config def from plugin (callback/cgroup_memory_recap)
9036 1684477395.55383: Loading CallbackModule 'cgroup_memory_recap' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/cgroup_memory_recap.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.55699: Loaded config def from plugin (callback/cgroup_perf_recap)
9036 1684477395.55704: Loading CallbackModule 'cgroup_perf_recap' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/cgroup_perf_recap.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.55739: Loading CallbackModule 'context_demo' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/context_demo.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.55775: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
9036 1684477395.55881: Loaded config def from plugin (callback/counter_enabled)
9036 1684477395.55886: Loading CallbackModule 'counter_enabled' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/counter_enabled.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.55936: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
9036 1684477395.56052: Loaded config def from plugin (callback/debug)
9036 1684477395.56057: Loading CallbackModule 'debug' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/debug.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.56091: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
9036 1684477395.56201: Loaded config def from plugin (callback/default)
9036 1684477395.56208: Loading CallbackModule 'default' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/default.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.56339: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
9036 1684477395.56454: Loaded config def from plugin (callback/dense)
9036 1684477395.56460: Loading CallbackModule 'dense' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/dense.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.56577: Loaded config def from plugin (callback/foreman)
9036 1684477395.56582: Loading CallbackModule 'foreman' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/foreman.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.56635: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
9036 1684477395.56723: Loaded config def from plugin (callback/full_skip)
9036 1684477395.56727: Loading CallbackModule 'full_skip' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/full_skip.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.58191: Loaded config def from plugin (callback/grafana_annotations)
9036 1684477395.58199: Loading CallbackModule 'grafana_annotations' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/grafana_annotations.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.58380: Loaded config def from plugin (callback/hipchat)
9036 1684477395.58388: Loading CallbackModule 'hipchat' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/hipchat.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.58499: Loaded config def from plugin (callback/jabber)
9036 1684477395.58507: Loading CallbackModule 'jabber' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/jabber.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.58603: Loaded config def from plugin (callback/json)
9036 1684477395.58607: Loading CallbackModule 'json' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/json.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.58743: Loaded config def from plugin (callback/junit)
9036 1684477395.58749: Loading CallbackModule 'junit' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/junit.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.58817: Loaded config def from plugin (callback/log_plays)
9036 1684477395.58821: Loading CallbackModule 'log_plays' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/log_plays.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.58921: Loaded config def from plugin (callback/logdna)
9036 1684477395.58926: Loading CallbackModule 'logdna' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/logdna.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.59061: Loaded config def from plugin (callback/logentries)
9036 1684477395.59072: Loading CallbackModule 'logentries' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/logentries.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.59126: Loaded config def from plugin (callback/logstash)
9036 1684477395.59129: Loading CallbackModule 'logstash' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/logstash.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.59271: Loaded config def from plugin (callback/mail)
9036 1684477395.59274: Loading CallbackModule 'mail' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/mail.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.59277: Loading CallbackModule 'minimal' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/minimal.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.59388: Loaded config def from plugin (callback/nrdp)
9036 1684477395.59392: Loading CallbackModule 'nrdp' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/nrdp.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.59417: Loading CallbackModule 'null' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/null.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.59442: Loading CallbackModule 'oneline' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/oneline.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.59536: Loading CallbackModule 'osx_say' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/osx_say.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.59558: Loading CallbackModule 'profile_roles' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/profile_roles.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.59605: Loaded config def from plugin (callback/profile_tasks)
9036 1684477395.59688: Loading CallbackModule 'profile_tasks' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/profile_tasks.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.59723: Loading CallbackModule 'say' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/say.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.59786: Loaded config def from plugin (callback/selective)
9036 1684477395.59789: Loading CallbackModule 'selective' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/selective.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.59835: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
9036 1684477395.59974: Loaded config def from plugin (callback/skippy)
9036 1684477395.59985: Loading CallbackModule 'skippy' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/skippy.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.60324: Loaded config def from plugin (callback/slack)
9036 1684477395.60340: Loading CallbackModule 'slack' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/slack.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.60474: Loaded config def from plugin (callback/splunk)
9036 1684477395.60489: Loading CallbackModule 'splunk' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/splunk.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.60574: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
9036 1684477395.60907: Loaded config def from plugin (callback/stderr)
9036 1684477395.60918: Loading CallbackModule 'stderr' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/stderr.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.61063: Loaded config def from plugin (callback/sumologic)
9036 1684477395.61073: Loading CallbackModule 'sumologic' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/sumologic.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.61353: Loaded config def from plugin (callback/syslog_json)
9036 1684477395.61357: Loading CallbackModule 'syslog_json' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/syslog_json.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.61376: Loading CallbackModule 'timer' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/timer.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.61458: Loading CallbackModule 'tree' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/tree.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.61530: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
9036 1684477395.61737: Loaded config def from plugin (callback/unixy)
9036 1684477395.61749: Loading CallbackModule 'unixy' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/unixy.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.61857: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
9036 1684477395.62059: Loaded config def from plugin (callback/yaml)
9036 1684477395.62066: Loading CallbackModule 'yaml' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/yaml.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
9036 1684477395.62131: in VariableManager get_vars()
9036 1684477395.62429: done with get_vars()
9036 1684477395.65471: trying /usr/share/ansible/plugins/strategy
9036 1684477395.65500: trying /usr/lib/python2.7/site-packages/ansible/plugins/strategy
9036 1684477395.65533: Loading StrategyModule 'linear' from /usr/lib/python2.7/site-packages/ansible/plugins/strategy/linear.py (searched paths: /usr/share/ansible/plugins/strategy:/usr/lib/python2.7/site-packages/ansible/plugins/strategy)
9036 1684477395.65697: getting the remaining hosts for this loop
9036 1684477395.65702: done getting the remaining hosts for this loop
9036 1684477395.65711: building list of next tasks for hosts
9036 1684477395.65713: getting the next task for host 192.168.56.102
9036 1684477395.65717: done getting next task for host 192.168.56.102
9036 1684477395.65720:  ^ task is: TASK: meta (flush_handlers)
9036 1684477395.65723:  ^ state is: HOST STATE: block=1, task=1, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
9036 1684477395.65724: done building task lists
9036 1684477395.65725: counting tasks in each state of execution
9036 1684477395.65727: done counting tasks in each state of execution:
    num_setups: 0
    num_tasks: 1
    num_rescue: 0
    num_always: 0
9036 1684477395.65729: advancing hosts in ITERATING_TASKS
9036 1684477395.65730: starting to advance hosts
9036 1684477395.65732: getting the next task for host 192.168.56.102
9036 1684477395.65734: done getting next task for host 192.168.56.102
9036 1684477395.65736:  ^ task is: TASK: meta (flush_handlers)
9036 1684477395.65737:  ^ state is: HOST STATE: block=1, task=1, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
9036 1684477395.65739: done advancing hosts to next task
9036 1684477395.66070: trying /usr/share/ansible/plugins/action
9036 1684477395.66080: trying /usr/lib/python2.7/site-packages/ansible/plugins/action
9036 1684477395.66543: done queuing things up, now waiting for results queue to drain
9036 1684477395.66553: results queue empty
9036 1684477395.66558: checking for any_errors_fatal
9036 1684477395.66564: done checking for any_errors_fatal
9036 1684477395.66568: checking for max_fail_percentage
9036 1684477395.66571: done checking for max_fail_percentage
9036 1684477395.66575: checking to see if all hosts have failed and the running result is not ok
9036 1684477395.66578: done checking to see if all hosts have failed
9036 1684477395.66581: getting the remaining hosts for this loop
9036 1684477395.66585: done getting the remaining hosts for this loop
9036 1684477395.66593: building list of next tasks for hosts
9036 1684477395.66596: getting the next task for host 192.168.56.102
9036 1684477395.66604: done getting next task for host 192.168.56.102
9036 1684477395.66613:  ^ task is: TASK: shell
9036 1684477395.66617:  ^ state is: HOST STATE: block=2, task=1, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
9036 1684477395.66620: done building task lists
9036 1684477395.66622: counting tasks in each state of execution
9036 1684477395.66625: done counting tasks in each state of execution:
    num_setups: 0
    num_tasks: 1
    num_rescue: 0
    num_always: 0
9036 1684477395.66628: advancing hosts in ITERATING_TASKS
9036 1684477395.66631: starting to advance hosts
9036 1684477395.66633: getting the next task for host 192.168.56.102
9036 1684477395.66637: done getting next task for host 192.168.56.102
9036 1684477395.66642:  ^ task is: TASK: shell
9036 1684477395.66645:  ^ state is: HOST STATE: block=2, task=1, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
9036 1684477395.66648: done advancing hosts to next task
9036 1684477395.66687: Loading ActionModule 'shell' from /usr/lib/python2.7/site-packages/ansible/plugins/action/shell.py (searched paths: /usr/share/ansible/plugins/action:/usr/lib/python2.7/site-packages/ansible/plugins/action) (found_in_cache=False, class_only=True)
9036 1684477395.66698: getting variables
9036 1684477395.66722: in VariableManager get_vars()
9036 1684477395.66752: Calling all_inventory to load vars for 192.168.56.102
9036 1684477395.66760: Calling groups_inventory to load vars for 192.168.56.102
9036 1684477395.66767: Calling all_plugins_inventory to load vars for 192.168.56.102
9036 1684477395.66877: Loading VarsModule 'host_group_vars' from /usr/lib/python2.7/site-packages/ansible/plugins/vars/host_group_vars.py
9036 1684477395.66901: Calling all_plugins_play to load vars for 192.168.56.102
9036 1684477395.66921: Loading VarsModule 'host_group_vars' from /usr/lib/python2.7/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
9036 1684477395.66938: Calling groups_plugins_inventory to load vars for 192.168.56.102
9036 1684477395.66955: Loading VarsModule 'host_group_vars' from /usr/lib/python2.7/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
9036 1684477395.66969: Calling groups_plugins_play to load vars for 192.168.56.102
9036 1684477395.66997: Loading VarsModule 'host_group_vars' from /usr/lib/python2.7/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
9036 1684477395.67101: Loading VarsModule 'host_group_vars' from /usr/lib/python2.7/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
9036 1684477395.67281: Loading VarsModule 'host_group_vars' from /usr/lib/python2.7/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
9036 1684477395.68266: done with get_vars()
9036 1684477395.68699: done getting variables
9036 1684477395.68771: sending task start callback, copying the task so we can template it temporarily
9036 1684477395.68789: done copying, going to template now
9036 1684477395.68798: done templating
9036 1684477395.68800: here goes the callback...
9036 1684477395.68823: sending task start callback
9036 1684477395.68830: entering _queue_task() for 192.168.56.102/shell
9036 1684477395.68850: Creating lock for shell
9036 1684477395.69850: worker is 1 (out of 1 available)
9036 1684477395.69919: exiting _queue_task() for 192.168.56.102/shell
9036 1684477395.70029: done queuing things up, now waiting for results queue to drain
9036 1684477395.70047: waiting for pending results...
9044 1684477395.70248: running TaskExecutor() for 192.168.56.102/TASK: shell
9044 1684477395.70399: in run() - task 08002774-754f-3081-672e-000000000009
9044 1684477395.70482: calling self._execute()
9044 1684477395.71840: trying /usr/share/ansible/plugins/connection
9044 1684477395.71858: trying /usr/lib/python2.7/site-packages/ansible/plugins/connection
9044 1684477395.73410: Loaded config def from plugin (connection/ssh)
9044 1684477395.73420: Loading Connection 'ssh' from /usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/connection:/usr/share/ansible/plugins/connection)
9044 1684477395.73454: trying /usr/lib/python2.7/site-packages/ansible/plugins/shell
9044 1684477395.73623: Loading ModuleDocFragment 'shell_common' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/shell_common.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments)
9044 1684477395.73838: Loaded config def from plugin (shell/sh)
9044 1684477395.73842: Loading ShellModule 'sh' from /usr/lib/python2.7/site-packages/ansible/plugins/shell/sh.py
9044 1684477395.73845: Loading ShellModule 'sh' from /usr/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
9044 1684477395.74044: Loading ActionModule 'shell' from /usr/lib/python2.7/site-packages/ansible/plugins/action/shell.py (searched paths: /usr/share/ansible/plugins/action:/usr/lib/python2.7/site-packages/ansible/plugins/action) (found_in_cache=True, class_only=False)
9044 1684477395.74052: starting attempt loop
9044 1684477395.74054: running the handler
9044 1684477395.74073: Loading ActionModule 'command' from /usr/lib/python2.7/site-packages/ansible/plugins/action/command.py (searched paths: /usr/share/ansible/plugins/action:/usr/lib/python2.7/site-packages/ansible/plugins/action)
9044 1684477395.74080: _low_level_execute_command(): starting
9044 1684477395.74084: _low_level_execute_command(): executing: /bin/sh -c 'echo ~ && sleep 0'
9044 1684477395.80291: stdout chunk (state=2):
>>>/root
<<<
9044 1684477395.80595: stdout chunk (state=3):
>>><<<
9044 1684477395.80603: stderr chunk (state=3):
>>><<<
9044 1684477395.80616: _low_level_execute_command() done: rc=0, stdout=/root
, stderr=
9044 1684477395.80627: _low_level_execute_command(): starting
9044 1684477395.80633: _low_level_execute_command(): executing: /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/ansible-tmp-1684477395.81-9044-262581187543020 `" && echo ansible-tmp-1684477395.81-9044-262581187543020="` echo /root/.ansible/tmp/ansible-tmp-1684477395.81-9044-262581187543020 `" ) && sleep 0'
9044 1684477395.85421: stdout chunk (state=2):
>>>ansible-tmp-1684477395.81-9044-262581187543020=/root/.ansible/tmp/ansible-tmp-1684477395.81-9044-262581187543020
<<<
9044 1684477395.86758: stdout chunk (state=3):
>>><<<
9044 1684477395.86766: stderr chunk (state=3):
>>><<<
9044 1684477395.86784: _low_level_execute_command() done: rc=0, stdout=ansible-tmp-1684477395.81-9044-262581187543020=/root/.ansible/tmp/ansible-tmp-1684477395.81-9044-262581187543020
, stderr=
9044 1684477395.91537: trying /usr/share/ansible/plugins/modules
9044 1684477395.91550: trying /usr/lib/python2.7/site-packages/ansible/modules
9044 1684477395.91562: trying /usr/lib/python2.7/site-packages/ansible/modules/cloud
9044 1684477395.91577: trying /usr/lib/python2.7/site-packages/ansible/modules/clustering
9044 1684477395.91592: trying /usr/lib/python2.7/site-packages/ansible/modules/commands
9044 1684477395.91693: ANSIBALLZ: Using generic lock for command
9044 1684477395.91700: ANSIBALLZ: Acquiring lock
9044 1684477395.91709: ANSIBALLZ: Lock acquired: 139910940766736
9044 1684477395.91716: ANSIBALLZ: Creating module
9044 1684477396.03028: ANSIBALLZ: Writing module into payload
9044 1684477396.03305: ANSIBALLZ: Writing module
9044 1684477396.03356: ANSIBALLZ: Renaming module
9044 1684477396.03378: ANSIBALLZ: Done creating module
9044 1684477396.03549: _low_level_execute_command(): starting
9044 1684477396.03571: _low_level_execute_command(): executing: /bin/sh -c 'echo PLATFORM; uname; echo FOUND; command -v '"'"'/usr/bin/python'"'"'; command -v '"'"'python3.7'"'"'; command -v '"'"'python3.6'"'"'; command -v '"'"'python3.5'"'"'; command -v '"'"'python2.7'"'"'; command -v '"'"'python2.6'"'"'; command -v '"'"'/usr/libexec/platform-python'"'"'; command -v '"'"'/usr/bin/python3'"'"'; command -v '"'"'python'"'"'; echo ENDFOUND && sleep 0'
9044 1684477396.08591: stdout chunk (state=2):
>>>PLATFORM
<<<
9044 1684477396.09902: stdout chunk (state=3):
>>>Linux
<<<
9044 1684477396.10332: stdout chunk (state=3):
>>>FOUND
/usr/bin/python
/usr/bin/python3.6
/usr/bin/python2.7
/usr/libexec/platform-python
/usr/bin/python3
/usr/bin/python
ENDFOUND
<<<
9044 1684477396.11238: stdout chunk (state=3):
>>><<<
9044 1684477396.11247: stderr chunk (state=3):
>>><<<
9044 1684477396.11263: _low_level_execute_command() done: rc=0, stdout=PLATFORM
Linux
FOUND
/usr/bin/python
/usr/bin/python3.6
/usr/bin/python2.7
/usr/libexec/platform-python
/usr/bin/python3
/usr/bin/python
ENDFOUND
, stderr=
9044 1684477396.11271 [192.168.56.102]: found interpreters: [u'/usr/bin/python', u'/usr/bin/python3.6', u'/usr/bin/python2.7', u'/usr/libexec/platform-python', u'/usr/bin/python3', u'/usr/bin/python']
9044 1684477396.11328: _low_level_execute_command(): starting
9044 1684477396.11338: _low_level_execute_command(): executing: /bin/sh -c '/usr/bin/python && sleep 0'
9044 1684477396.12164: Sending initial data
9044 1684477396.12198: Sent initial data (1234 bytes)
9044 1684477396.19427: stdout chunk (state=3):
>>>{"osrelease_content": "NAME=\"CentOS Linux\"\nVERSION=\"7 (Core)\"\nID=\"centos\"\nID_LIKE=\"rhel fedora\"\nVERSION_ID=\"7\"\nPRETTY_NAME=\"CentOS Linux 7 (Core)\"\nANSI_COLOR=\"0;31\"\nCPE_NAME=\"cpe:/o:centos:centos:7\"\nHOME_URL=\"https://www.centos.org/\"\nBUG_REPORT_URL=\"https://bugs.centos.org/\"\n\nCENTOS_MANTISBT_PROJECT=\"CentOS-7\"\nCENTOS_MANTISBT_PROJECT_VERSION=\"7\"\nREDHAT_SUPPORT_PRODUCT=\"centos\"\nREDHAT_SUPPORT_PRODUCT_VERSION=\"7\"\n\n", "platform_dist_result": ["centos", "7.9.2009", "Core"]}
<<<
9044 1684477396.20045: stdout chunk (state=3):
>>><<<
9044 1684477396.20085: stderr chunk (state=3):
>>><<<
9044 1684477396.20099: _low_level_execute_command() done: rc=0, stdout={"osrelease_content": "NAME=\"CentOS Linux\"\nVERSION=\"7 (Core)\"\nID=\"centos\"\nID_LIKE=\"rhel fedora\"\nVERSION_ID=\"7\"\nPRETTY_NAME=\"CentOS Linux 7 (Core)\"\nANSI_COLOR=\"0;31\"\nCPE_NAME=\"cpe:/o:centos:centos:7\"\nHOME_URL=\"https://www.centos.org/\"\nBUG_REPORT_URL=\"https://bugs.centos.org/\"\n\nCENTOS_MANTISBT_PROJECT=\"CentOS-7\"\nCENTOS_MANTISBT_PROJECT_VERSION=\"7\"\nREDHAT_SUPPORT_PRODUCT=\"centos\"\nREDHAT_SUPPORT_PRODUCT_VERSION=\"7\"\n\n", "platform_dist_result": ["centos", "7.9.2009", "Core"]}
, stderr=
9044 1684477396.20142: ANSIBALLZ: using cached module: /root/.ansible/tmp/ansible-local-903604p49G/ansiballz_cache/command-ZIP_DEFLATED
9044 1684477396.20456: transferring module to remote /root/.ansible/tmp/ansible-tmp-1684477395.81-9044-262581187543020/AnsiballZ_command.py
9044 1684477396.21321: Sending initial data
9044 1684477396.21397: Sent initial data (145 bytes)
9044 1684477396.27467: stdout chunk (state=3):
>>>sftp> put /root/.ansible/tmp/ansible-local-903604p49G/tmpI4poN6 /root/.ansible/tmp/ansible-tmp-1684477395.81-9044-262581187543020/AnsiballZ_command.py
<<<
9044 1684477396.29181: stdout chunk (state=3):
>>><<<
9044 1684477396.29195: stderr chunk (state=3):
>>><<<
9044 1684477396.29214: done transferring module to remote
9044 1684477396.29228: _low_level_execute_command(): starting
9044 1684477396.29233: _low_level_execute_command(): executing: /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1684477395.81-9044-262581187543020/ /root/.ansible/tmp/ansible-tmp-1684477395.81-9044-262581187543020/AnsiballZ_command.py && sleep 0'
9044 1684477396.32931: stdout chunk (state=2):
>>><<<
9044 1684477396.32958: stderr chunk (state=2):
>>><<<
9044 1684477396.33022: _low_level_execute_command() done: rc=0, stdout=, stderr=
9044 1684477396.33030: _low_level_execute_command(): starting
9044 1684477396.33044: _low_level_execute_command(): executing: /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1684477395.81-9044-262581187543020/AnsiballZ_command.py && sleep 0'
9044 1684477396.53936: stdout chunk (state=2):
>>>
{"changed": true, "end": "2023-05-19 14:23:16.525820", "stdout": "Linux node1 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux", "cmd": "uname -a", "rc": 0, "start": "2023-05-19 14:23:16.515751", "stderr": "", "delta": "0:00:00.010069", "invocation": {"module_args": {"creates": null, "executable": null, "_uses_shell": true, "strip_empty_ends": true, "_raw_params": "uname -a", "removes": null, "argv": null, "warn": true, "chdir": null, "stdin_add_newline": true, "stdin": null}}}
<<<
9044 1684477396.54602: stderr chunk (state=3):
>>>Shared connection to 192.168.56.102 closed.
<<<
9044 1684477396.54620: stderr chunk (state=3):
>>><<<
9044 1684477396.54624: stdout chunk (state=3):
>>><<<
9044 1684477396.54643: _low_level_execute_command() done: rc=0, stdout=
{"changed": true, "end": "2023-05-19 14:23:16.525820", "stdout": "Linux node1 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux", "cmd": "uname -a", "rc": 0, "start": "2023-05-19 14:23:16.515751", "stderr": "", "delta": "0:00:00.010069", "invocation": {"module_args": {"creates": null, "executable": null, "_uses_shell": true, "strip_empty_ends": true, "_raw_params": "uname -a", "removes": null, "argv": null, "warn": true, "chdir": null, "stdin_add_newline": true, "stdin": null}}}
, stderr=Shared connection to 192.168.56.102 closed.
9044 1684477396.54843: done with _execute_module (command, {'_ansible_version': '2.9.27', '_ansible_socket': None, '_ansible_remote_tmp': u'~/.ansible/tmp', '_uses_shell': True, '_ansible_no_log': False, '_ansible_module_name': 'command', u'_raw_params': u'uname -a', '_ansible_verbosity': 0, '_ansible_keep_remote_files': False, '_ansible_syslog_facility': u'LOG_USER', 'warn': True, '_ansible_string_conversion_action': u'warn', '_ansible_selinux_special_fs': ['fuse', 'nfs', 'vboxsf', 'ramfs', '9p', 'vfat'], '_ansible_diff': False, '_ansible_debug': True, '_ansible_shell_executable': u'/bin/sh', '_ansible_check_mode': False, '_ansible_tmpdir': u'/root/.ansible/tmp/ansible-tmp-1684477395.81-9044-262581187543020/'})
9044 1684477396.54855: _low_level_execute_command(): starting
9044 1684477396.54861: _low_level_execute_command(): executing: /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1684477395.81-9044-262581187543020/ > /dev/null 2>&1 && sleep 0'
9044 1684477396.59946: stdout chunk (state=2):
>>><<<
9044 1684477396.59962: stderr chunk (state=2):
>>><<<
9044 1684477396.59978: _low_level_execute_command() done: rc=0, stdout=, stderr=
9044 1684477396.60011: handler run complete
9044 1684477396.60374: attempt loop complete, returning result
9044 1684477396.60387: _execute() done
9044 1684477396.60393: dumping result to json
9044 1684477396.60401: done dumping result, returning
9044 1684477396.60919: done running TaskExecutor() for 192.168.56.102/TASK: command [08002774-754f-3081-672e-000000000009]
9044 1684477396.60939: sending task result for task 08002774-754f-3081-672e-000000000009
9044 1684477396.61443: done sending task result for task 08002774-754f-3081-672e-000000000009
9044 1684477396.61689: WORKER PROCESS EXITING
192.168.56.102 | CHANGED | rc=0 >>
Linux node1 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
9036 1684477396.62097: no more pending results, returning what we have
9036 1684477396.62100: results queue empty
9036 1684477396.62101: checking for any_errors_fatal
9036 1684477396.62103: done checking for any_errors_fatal
9036 1684477396.62104: checking for max_fail_percentage
9036 1684477396.62106: done checking for max_fail_percentage
9036 1684477396.62107: checking to see if all hosts have failed and the running result is not ok
9036 1684477396.62108: done checking to see if all hosts have failed
9036 1684477396.62110: getting the remaining hosts for this loop
9036 1684477396.62111: done getting the remaining hosts for this loop
9036 1684477396.62116: building list of next tasks for hosts
9036 1684477396.62118: getting the next task for host 192.168.56.102
9036 1684477396.62121: done getting next task for host 192.168.56.102
9036 1684477396.62124:  ^ task is: TASK: meta (flush_handlers)
9036 1684477396.62126:  ^ state is: HOST STATE: block=3, task=1, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
9036 1684477396.62127: done building task lists
9036 1684477396.62129: counting tasks in each state of execution
9036 1684477396.62130: done counting tasks in each state of execution:
    num_setups: 0
    num_tasks: 1
    num_rescue: 0
    num_always: 0
9036 1684477396.62132: advancing hosts in ITERATING_TASKS
9036 1684477396.62133: starting to advance hosts
9036 1684477396.62135: getting the next task for host 192.168.56.102
9036 1684477396.62137: done getting next task for host 192.168.56.102
9036 1684477396.62139:  ^ task is: TASK: meta (flush_handlers)
9036 1684477396.62140:  ^ state is: HOST STATE: block=3, task=1, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
9036 1684477396.62142: done advancing hosts to next task
9036 1684477396.62156: done queuing things up, now waiting for results queue to drain
9036 1684477396.62163: results queue empty
9036 1684477396.62165: checking for any_errors_fatal
9036 1684477396.62168: done checking for any_errors_fatal
9036 1684477396.62170: checking for max_fail_percentage
9036 1684477396.62171: done checking for max_fail_percentage
9036 1684477396.62172: checking to see if all hosts have failed and the running result is not ok
9036 1684477396.62173: done checking to see if all hosts have failed
9036 1684477396.62174: getting the remaining hosts for this loop
9036 1684477396.62176: done getting the remaining hosts for this loop
9036 1684477396.62180: building list of next tasks for hosts
9036 1684477396.62181: getting the next task for host 192.168.56.102
9036 1684477396.62183: done getting next task for host 192.168.56.102
9036 1684477396.62186:  ^ task is: TASK: meta (flush_handlers)
9036 1684477396.62187:  ^ state is: HOST STATE: block=4, task=1, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
9036 1684477396.62189: done building task lists
9036 1684477396.62190: counting tasks in each state of execution
9036 1684477396.62191: done counting tasks in each state of execution:
    num_setups: 0
    num_tasks: 1
    num_rescue: 0
    num_always: 0
9036 1684477396.62193: advancing hosts in ITERATING_TASKS
9036 1684477396.62194: starting to advance hosts
9036 1684477396.62195: getting the next task for host 192.168.56.102
9036 1684477396.62197: done getting next task for host 192.168.56.102
9036 1684477396.62199:  ^ task is: TASK: meta (flush_handlers)
9036 1684477396.62201:  ^ state is: HOST STATE: block=4, task=1, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
9036 1684477396.62202: done advancing hosts to next task
9036 1684477396.62208: done queuing things up, now waiting for results queue to drain
9036 1684477396.62210: results queue empty
9036 1684477396.62211: checking for any_errors_fatal
9036 1684477396.62213: done checking for any_errors_fatal
9036 1684477396.62214: checking for max_fail_percentage
9036 1684477396.62215: done checking for max_fail_percentage
9036 1684477396.62216: checking to see if all hosts have failed and the running result is not ok
9036 1684477396.62217: done checking to see if all hosts have failed
9036 1684477396.62218: getting the remaining hosts for this loop
9036 1684477396.62220: done getting the remaining hosts for this loop
9036 1684477396.62224: building list of next tasks for hosts
9036 1684477396.62226: getting the next task for host 192.168.56.102
9036 1684477396.62228: done getting next task for host 192.168.56.102
9036 1684477396.62230:  ^ task is: None
9036 1684477396.62232:  ^ state is: HOST STATE: block=5, task=0, rescue=0, always=0, run_state=ITERATING_COMPLETE, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
9036 1684477396.62281: done building task lists
9036 1684477396.62285: counting tasks in each state of execution
9036 1684477396.62287: done counting tasks in each state of execution:
    num_setups: 0
    num_tasks: 0
    num_rescue: 0
    num_always: 0
9036 1684477396.62288: all hosts are done, so returning None's for all hosts
9036 1684477396.62290: done queuing things up, now waiting for results queue to drain
9036 1684477396.62292: results queue empty
9036 1684477396.62293: checking for any_errors_fatal
9036 1684477396.62294: done checking for any_errors_fatal
9036 1684477396.62295: checking for max_fail_percentage
9036 1684477396.62296: done checking for max_fail_percentage
9036 1684477396.62297: checking to see if all hosts have failed and the running result is not ok
9036 1684477396.62298: done checking to see if all hosts have failed
9036 1684477396.62300: getting the next task for host 192.168.56.102
9036 1684477396.62303: done getting next task for host 192.168.56.102
9036 1684477396.62304:  ^ task is: None
9036 1684477396.62305:  ^ state is: HOST STATE: block=5, task=0, rescue=0, always=0, run_state=ITERATING_COMPLETE, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
9036 1684477396.62307: running handlers
9036 1684477396.62411: RUNNING CLEANUP


在debug日志中我们可以看出,ansible主要的执行流程有:

  • 获取inventory: 即读取用户输入的host文件(ansible -i hosts)或者默认的/etc/ansible/hosts文件,从而获取到用户输入的指令需要在哪些物理机器上执行;
  • 加载plugins目录下的所有的插件;
  • 获取用户输入的参数(如果有);
  • 获取指令执行的策略(linear或者free),默认为linear;linear 策略即线性执行策略。线性执行策略指主机组内所有主机完成一个任务后才继续下一个任务的执行。free 策略即自由策略,即在一个 play 执行完之前,每个主机都各顾各的尽可能快的完成 play 里的所有任务,而不会因为其他主机没执行完任务而等待;
  • 将要执行的指令作为一个任务加入到任务队列,任务真正的执行阶段通过迭代任务队列获取下一个需要执行的任务;
  • 执行任务:ansible中执行某个指令并不是直接将指令发到远端去执行(因为要兼容不同的平台),而是将指令和ansible的模板脚本(python脚本)打包一起发到要执行的节点,解压并import需要的包,获取当前平台的python版本(interpreters),执行python脚本(low_level_execute_command(): executing: /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1684477395.81-9044-262581187543020/ /root/.ansible/tmp/ansible-tmp-1684477395.81-9044-262581187543020/AnsiballZ_command.py && sleep 0'),获取执行结果,然后清理现场之后返回;
文章来自个人专栏
存储-异步远程复制
3 文章 | 1 订阅
0条评论
0 / 1000
请输入你的评论
0
0