Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat(ansible): make ansible verbosity configurable #1852

Closed
wants to merge 7 commits into from

Commits on Oct 10, 2019

  1. feat(ansible): make ansible verbosity configurable

    The primary objective of this change is to make the verbosity of
    individual `ansible-runner` command invocations configurable (not just
    "-vv"). In order to accomplish this:
    
    * A new flag was added to the AnsibleOperatorFlags (ansible-verbosity)
      with a default value of 2.
    * The entire flagset is given to the watches pkg Load() to provide one
      place for handling command line arguments, watches config values, and
      environment variables. This makes an individual watch more useful when
      creating a runner and adding a GVK to the controller. Also, this puts
      new fields on the Watch struct (MaxWorkers and AnsibleVerbosity).
    * New functions were added to the watches pkg -- New(gvk) instantiates a
      Watch with sensible defaults. Validate() is used to verify a given
      watch meets certain criteria (legit path to playbook/role and proper
      finalizer). This makes it possible for someone who only knows their
      GVK and role/playbook to easily create a watch that can be used with
      the runner pkg.
    * When creating a runner from a watch, we will now validate it using
      watches.Validate(). Essentially the watches pkg should know what is
      and isn't a valid watch.
    * New helper functions in the runner pkg -- ansibleVerbosityString to
      convert an integer AnsibleVerbosity to a string (ie. 2 becomes "-vv"),
      playbookCmdFunc, and roleCmdFunc consolidate the logic for creating
      the cmdFund.
    djzager committed Oct 10, 2019
    Configuration menu
    Copy the full SHA
    42574ed View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0d38e6b View commit details
    Browse the repository at this point in the history
  3. Add timeout for metrics check

    djzager committed Oct 10, 2019
    Configuration menu
    Copy the full SHA
    bc3a919 View commit details
    Browse the repository at this point in the history
  4. No worker/verbosity config on watches yaml

    Prevent configuration of ansible verbosity or max worker from
    watches.yaml
    djzager committed Oct 10, 2019
    Configuration menu
    Copy the full SHA
    fb2c63f View commit details
    Browse the repository at this point in the history
  5. Remove ansible run_test

    Since there are no tests added to the file, remove the file so it's
    obvious there are no tests for the Ansible operator's run function.
    djzager committed Oct 10, 2019
    Configuration menu
    Copy the full SHA
    18d1e6b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    1ab748e View commit details
    Browse the repository at this point in the history
  7. Add documentation

    djzager committed Oct 10, 2019
    Configuration menu
    Copy the full SHA
    532ebb7 View commit details
    Browse the repository at this point in the history