Ansible-runner is using their own custom call back and it appears to be
failing when actually set to a non-string. Check to make sure host is a
string or just unset it if it isn't a string value.
Change-Id: Ib67b6bd69ed1c3f9fcd32552b6599cbe4ff478ce
Closes-Bug: #1904917
When we grab the task to execute, use the one we fetch to advance the
host rather than the peeked version.
Change-Id: If8f53f900070bb714662e519b4017d963af30ccc
Currently any_errors_fatal cannot be dynamic value based on the current
task vars. This change attempts to evaulate the provided value and
verifies it's a boolean when using it to handle the any_errors_fatal
logic.
Related Upstream: https://github.com/ansible/ansible/pull/70694
Related-Bug: #1887702
Change-Id: I31cf042b72aad5cdd2c7c1ae8bc319eca372acff
Tasks did not have the concept of throttling prior to ansible 2.9 so if
we want to allow this to be re-used with older versions then we need to
skip the throttling code if task doesn't contain the throttle attribute.
This will help if we want to backport this for upgrades.
Change-Id: I01f6e3a69dec25ec69782c087d6b81ce3f33e6c0
In this patch we update the new strategies so they support a max failure
percentage on a play. Which will be useful for the tripleo roles so we
can tolerate some % of failure (e.g. on computes) during a deployment.
Co-Authored-By: Alex Schultz <aschultz@redhat.com>
Co-Authored-By: Kevin Carter <kecarter@redhat.com>
Co-Authored-By: Emilien Macchi <emilien@redhat.com>
Change-Id: I30a930e4f7b8200ffa67c17b967db8a1fb60b4c0
In order to allow us to share some logic between the linear and free
strategies, we need to create a base strategy to use for our shared
logic.
Change-Id: I593f193f98112dbf1d493ffd22040837597db11c
Prior to this patch, run_once was basically ignored. This patch adds
tracking on tasks that are tagged with run_once and will only allow it
to be invoked once. This means if the run_once task fails, all the other
hosts will continue to process their tasks like nothing happened. The
play itself will exit if the run_once task fails at the end. For tripleo
this means that run_once should not be used for any required tasks
within a play but can be used to make sure a task will only run once
time for a given play.
Change-Id: Iaa1278763d56429b2886371a18477e1f54680e19
This strategy is to be used for the execution of deployment steps so
that tasks run on all hosts (up to # of workers) freely without locking
at each task. This is closer to what we had when Heat drove the
deployments as each of the software deployments would execute
simultaneously on all nodes at the same time.
This strategy does two important things for us:
1) Hosts execute their tasks freely with no dependencies on the other
hosts that are running the same tasks
2) Failures on any given host will not stop future tasks from
executing on other hosts, but will cause the overall playbook
execution to stop at the end of the "PLAY".
These specific things are how the previous deployment executed when Heat
was the driver of deployment actions. The nodes would fetch their list
of actions, execute and report back to status. Heat would fail the
deployment if any of the hosts failed to execute their work however a
failure on one host did not impact the other hosts. The TripleO
deployment framework already has the step concept in itself to allow
for the individual steps (1 through 5) to execute in a parallael on all
hosts at the same time. At the end of the "PLAY", ansible waits for all
nodes to complete before proceeding on to the next "PLAY". So Step 1 is
a "PLAY" followed by Step 2. If a failure occurs during Step 1 on any
host, we would not proceed to the Step 2 play.
Change-Id: Id921ed48a948211b9a90def4a4667d015ec11d2f