Commit Graph

7 Commits

Author SHA1 Message Date
Alex Schultz
8d1fc85744 Use ansible_facts instead
In order to ANSIBLE_INJECT_FACT_VARS=False we have to use ansible_facts
instead of ansible_* vars. This change switches our distribution and
hostname related items to use ansible_facts instead.

Change-Id: I49a2c42dcbb74671834f312798367f411c819813
Related-Bug: #1915761
2021-02-22 17:57:17 +00:00
Emilien Macchi
03bb3bbdb4 Create container-puppet-tasks files per step in check mode
In check mode, we still create the container-puppet-tasks json files,
they are later processed, even in dry run.

Change-Id: If999952c6cc0c9bf03ca745bddcf79c395a44e98
2020-09-25 10:19:33 -04:00
Emilien Macchi
3a00c029f2 Deprecate EnablePaunch and remove Paunch support
Paunch was deprecated in Ussuri and is now being retired, to be fully
replaced by the new tripleo-ansible role, tripleo_container_manage.

This patch:

- Removes common/container-puppet.py (was only useful when paunch is
  enabled, since that script was converted to container_puppet_config
  Ansible module in tripleo-ansible).
- Update all comments refering to paunch, and replace by
  tripleo_container_manage.
- Deprecate EnablePaunch parameter.
- Remove paunch as python dependencies.

Depends-On: https://review.opendev.org/#/c/731545/
Change-Id: I9294677fa18a7efc61898a25103414c8191d8805
2020-06-03 17:53:40 +00:00
Rabi Mishra
6db0ac0856 Include {{step}} when setting facts
We don't set the fact specific to a step and it seems
to run those puppet tasks for subsequent steps too.

Change-Id: Ic276ea6f34dd638ad66505aa77bddff0e4071ad4
Closes-Bug #1870291
2020-04-02 20:25:15 +05:30
Cédric Jeanneret
e236ff0cf9 Ensure consistency with hostname comparison
It might happen an operator wants to get «camelcased» hostname.

Since the RFC[1] states "no distinction is made between upper and lower
case", we have to ensure string comparisons made in ansible are all
lowered.

[1] https://tools.ietf.org/html/rfc952

Closes-Bug: #1869360
Needed-By: https://review.opendev.org/71541
Change-Id: I988a8ce958f9fb21115aacde526c2dc89a3c8d66
2020-03-30 11:41:45 +02:00
Emilien Macchi
ed720b0c83 Add support to run Container Puppet tasks without Paunch
Deploy the container-puppet-* containers with tripleo-container-manage
instead of container-puppet.py which uses Paunch.

This is the last piece where Paunch isn't used anymore in the
deployment.

Change-Id: I6fdf03a639ca63047fdd6ef603f549781a06d07b
2020-02-07 18:22:06 +00:00
James Slagle
1602d68daa Dynamically include container-puppet tasks
The container-puppet tasks only need to be run if tasks actually exist, which
is already being checked on the ansible control node.

A "when" statement is then applied to the set of tasks necessary to run
the container-puppet tasks, when the tasks are actually defined.

This patch moves that set of tasks to a separate tasks file and uses a
dynamic include.  This results in less tasks being skipped, which can
save several minutes at scale. This results in 3 less tasks that need to
be skipped at steps 1-5, which equates to 15 tasks overall, when no
container-puppet tasks actually exist.

When container-puppet tasks do exist, all the tasks will be executed as
necessary.

Change-Id: Ifad32bf79942cde58295fd9aae7e23e2f62c1ae2
2020-02-06 18:00:18 +00:00