Implement Ansible action module for logging
Coming from #64 (closed) and #67 (closed), we plan to create a new Ansible action module to allow backend tasks to log their operations directly back to the frontend from Ansible roles themselves. This will likely replace the existing warn
module, to provide a way for backend roles to inject their own output into the logs dispatcherd
is picking up.
TODO:
-
Un-escape log lines in aegir:log
-
Update example_print_debug_data
ansible "task" role to useaegir_log
:-
emit basic (fixed) string log message -
emit (variable) field data as a log message
-
-
copy aegir_input.py
toaegir_log.py
and adjust as needed-
rough in aegir_log.py
-
-
write tests for: -
drupal aegir:log -
dispatcherd relay_aegir_log task (not really viable stand-alone. done via tests of aegir:log
command) -
relayd aegir_log task (not really viable stand-alone. done via tests of aegir:log
command) -
Add a test step to look for output from the aegir_log
action module emitted byexample_print_debug_data
Ansible "task" role in Example Site test Scenario (profile/modules/examples/example_site/features/example_site.feature
) to illustrate the default Operation running/logging behaviour. (followup in #58)
-
-
create aegir:log
console command to receive log data: sequence (for now), timestamp, and data -
create log_command_test
fixtures module to provide a simple Operation (no tasks needed, the base fields are all we need to log data) -
add log_command_test Feature to test the aegir:log
command (usingaegir:input
as a model) -
implement Behat "Given :type operations:" step definition to instantiate a fixture Operation for the test -
update docs: -
to reflect the new logging and input architecture via relayd
-
how to use the aegir_log
action module in a "task" role
-
Edited by Derek Laventure