Commit Graph

18 Commits

Author SHA1 Message Date
Ian Wienand e5e1127122 Add delete to synchronize
Since I53cb63ffa4ae50575d4fa37b24323ad13ec1bac3 some puppet runs are
failing because system-config:playbooks/roles/set-hostname moved to
roles/set-hostname and became a symlink.  rsync refuses to overwrite
the directory with a symlink because it seems to not be empty, because
we never removed the files in it.

Handle the possibility of things moving around like this by
specifying delete so old files are cleared out.

Finally set manifest_base dir ownership and mode to address linter E208.

Depends-On: https://review.opendev.org/762181
Change-Id: I249d713214d8383a3ccfe1a400404cbdcb97dcc6
2020-11-10 09:48:56 -08:00
Monty Taylor eafdbf9593 Add flag to control logging the rsyncs
rsyncing the puppet modules can be super chatty and not super
interesting. Add a flag to turn it off.

Change-Id: I7206955aeb335adafb8625c89d8b8a70078d666c
2020-04-30 08:45:59 -05:00
Monty Taylor 0505f79daa Add color parameter
When we're logging inside of ansible, turning off ansi colors can
be nice. Especially inside of Zuul.

Change-Id: I719ebb106fbb31795cc02c9504507bdae607bcdd
2020-04-21 16:04:48 -05:00
Zuul 7570d49d8e Merge "Revert "Don't log puppot module sync"" 2019-07-18 16:37:41 +00:00
Andreas Jaeger 7a9fd23801 Fix ansible-lint
The current tests never fail, change ansible-lint invocation so that it
fails - and fix problems.

Change-Id: I6aeb1e3a4c28af71a858ec83c21f4dbb5e7ef97f
2019-05-13 18:30:12 +02:00
Colleen Murphy ac51f0245b Revert "Don't log puppot module sync"
This reverts commit 7b47277e3e.

It turns out that for some reason this boring operation does actually go
wrong[1], and if logging doesn't happen then we don't know why.

[1] http://logs.openstack.org/00/616000/6/check/infra-puppet-apply-4-ubuntu-xenial/7379d8c/applytest/puppetapplytest44.final.out.FAILED

Change-Id: I2ce9c3d79385fc0a01b3a5fc85fa4bf4128c25bc
2019-01-03 15:09:50 +01:00
Clark Boylan 98b7ea710b Fix ansible block, always, when syntax
Newer ansible (2.7) is far more picky about always blocks being a part
of block blocks. This means you cannot have a set of when conditions
apply to a standalone always block. Fix our use of this by putting our
always block in the run puppet block then move the always tasks into a
block of their own with a condition set.

Change-Id: I50988b6b312e4d00b73ca4454e0420913d4ae181
2018-09-12 13:08:28 -07:00
James E. Blair 7b47277e3e Don't log puppot module sync
This is boring.  The output is voluminous.

Change-Id: Ib905311a2b3c4eb9a0316f3863aa688b9ed07c55
2018-08-17 14:02:48 -07:00
Zuul 3bf4b22034 Merge "Make sure target manifest directory exists" 2018-08-17 20:44:43 +00:00
Zuul a0ce4c7317 Merge "Allow overiding the remote hieradata link dest" 2018-08-17 20:44:43 +00:00
Monty Taylor ffbb43a218
Make sure target manifest directory exists
On a bare system, bridge.o.o will be trying to rsync /opt/system-config/
to /opt/system-config/production - but if /opt/system-config doesn't
exist on the remote host, the rsync will fail. Make sure we create the
directory.

Change-Id: Id56a537fe2352c099b81559eb4032138ba108bed
2018-08-17 13:58:25 -05:00
Monty Taylor 7fc585e1ab
Allow overiding the remote hieradata link dest
In order to support the layouts being different on the management server
and the remote nodes, we need to also be able to override the location
of the link that gets made. Add a variable that defaults to the old
value.

Change-Id: I7434c1b1a9d79f04b3e872e750057d69490e80e0
2018-08-17 13:43:46 -05:00
Zuul 6e8b8a56b9 Merge "Add ability to override mgmt manifest path" 2018-08-17 17:45:44 +00:00
Monty Taylor 0a3c32b5ac
Add ability to override mgmt manifest path
We have it currently hardcoded that the manifests on the management
server are going to have an environment path. Add a variable to allow
override of that idea.

Change-Id: I226c030332ff93c3ee74650c7ab725994971f007
Needed-By: https://review.openstack.org/592763
2018-08-17 05:21:53 -05:00
Zuul 05fb2ce4e4 Merge "Allow setting puppet_version explicitly" 2018-08-16 16:22:01 +00:00
Monty Taylor d8a1943081
Change include_tasks back to include
The ansible on puppetmaster is too old for this.

Change-Id: I49458188e5ddd61bba95c9eb28792364008389c6
2018-08-15 18:32:38 -05:00
Monty Taylor 745913a3c2
Allow setting puppet_version explicitly
If we set puppet_version as an inventory variable, then we can drive
behavior from that variable, including updating puppet. Add the ability
to set it here. A followup change in system-config will start setting
it, but starting off it should be a no-op.

Change-Id: I773ba3a2137b62ae2b3440dd02b3cdfb2099a62d
2018-08-15 14:24:33 -05:00
Monty Taylor 92d5d596b9
Update yaml style to be consistent with infra yaml
Infra has adopted the approach of indenting lists an extra level
instead of starting their '-' at the same level as the parent element.
Additionally, Infra uses .yaml extensions instead of .yml extensions.
This role predates Infra having enough ansible to have opinions, so
update it to match current practice.

Also, while we're in there, update when clauses that have an 'and' in
them to just use the list form of when, and change 'include:' to
'include_tasks:'.

Change-Id: Icbeaf99c4d103091ee094e2fa219d7e16229b998
2018-08-09 09:04:06 -05:00