The content from the openstack-ansible-os_swift_sync repository has
been merged into the openstack-ansible-os_swift repository and is
therefore no longer needed.
This patch implements the retirement of the os_swift_sync
repository content as per [1].
[1] http://docs.openstack.org/infra/manual/drivers.html#retiring-a-project
Change-Id: If147d82709d55fe54d6658a889de1f3a19879d7b
Latest release of ansible-lint 2.4.0 has broken
role linter tasks by introducing a dependency on
openstack-ansible-plugins for all linting
While we may choose to adapt the linter tox env
in the future, for now we want to return to previous
linter behavior.
Change-Id: I4a08ef43405ffedea0a03793510eb1a05adf4d29
The dependencies section is spaced incorrectly, resulting in the role
not being installable via ansible-galaxy.
Change-Id: I55fe54d076269b20013b71445bce5dc6a082d6b0
The ansible-galaxy tool requires the presence of the dependencies list
in the role's meta information.
Change-Id: I09dafc869de09f9270ed929fd0e1a5709ba120bb
Within the tox.ini under the [flake8] section the "max-line-length"
is being set because of the venv supported added to the #! at the top
of the python files which causes the tox linters check to fail. The
"max-line-length" has been set to 120.
Updates have been made to the swift sync python files so that they
pass lint checks.
Change-Id: Icab26bb57e2f5bd5d905080e583502aeeb423cf4
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
ansible-lint 2.3.7 added a rule checking for use of the deprecated
'sudo' and 'sudo_user' directives. They have been replaced with 'become'
and 'become_user' respectively.
Change-Id: I2271fe8468840884f19f41abba37e696c6296350
This patch fixes a few syntax issues required for Ansible 2
compatibility that Ansible 1.x was more lenient with.
When a 'when' clause is combined with a 'with_*' statement, the clause
is processed separately for each item. Tasks with 'when' clauses which
depended on an item variable being defined have either applied a default
empty value to the item or a new task individual task has been created
for each item in the loop.
Tasks within the os-cinder-install playboook have been updated to loop
through cinder_backends as a hash.
Change-Id: I9b53eb5dd709a6bed1797961015aa3dd328340f3
The use of activate_this to access the venv libraries means that the
system site packages are also included when the scripts swift_rings.py
and swift_rings_check.py are run.
This commit updates the interpreter directive for those scripts, when
Swift is deployed in a venv, to use the venv's interpreter.
Change-Id: I3ff0bf60c9ca695cddc28b05a8e8cc67d5f240e5
Closes-bug: 1538993
Extracting the ssh public key using cat and storing the result in a
fact has resulted in periodic failures in the collection of the key,
and thereafter the failure to appropriately place that key into the
authorised_keys file.
This patch changes the collection method to use the Ansible slurp
module which has been found to be more reliable.
Closes-Bug: #1506291
Change-Id: I3ba5cdc944f38c67762860dc0d06bd5c35eeb269
The swift_rings.py file that updates the swift ring files are
failing to update the weight in a builder file. This is caused
by the weight passed into the swift-ring-builder CLI needing
to be a string.
This patch converts the weight to a string when passing it to
swift-ring-builder.
Closes-Bug: #1532204
Change-Id: Iceb3f19eb226fdcfd373fa73d8a5d41b41a239af
This commit conditionally allows the os_swift role to
install build and deploy within a venv. This is the new
default behavior of the role however the functionality
can be disabled.
In this PR, like all of the other venv related PRs, the
`is_metal` flag was removed from the role however unlike
some of the other PRs this removal required moving some
of the `is_metal` logic out of the role and into the
play. This was done for consistency as well as making
the role more standalone. The only thing that the role
should care about, in terms of installation, is whether
or not to install in a venv.
Change-Id: I6f5b883a853611659567bd12e8bcf572189854b7
Implements: blueprint enable-venv-support-within-the-roles
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
Add the swift-remote host group and environment file.
Add an os_swift_sync role which will sync the swift ring and ssh keys
for swift hosts (remote and not-remote). Which has the following:
* Moves the key and ring tasks out of os_swift role to os_swift_sync.
* This adds the use of the "-r" flag that was added to the
swift_rings.py and swift_rings_check.py.
* Adds a ring.builder vs contents file consistency check.
* Adjusts the rsync process to use the built-in synchronize module
* Ensure services have started post ring/ssh key sync.
Adds environment file and sample configuration file for swift-remote
hosts (conf.d).
Move appropriate default vars to the os_swift_sync role, and remove them
from the os_swift role.
Rename the "os-swift-install.yml" playbook to "os-swift-setup.yml" as
this handles only the setup, and add a playbook to for both
os-swift-sync.yml and an overarching playbook (os-swift-install.yml)
that will call both the os-swift-sync.yml and os-swift-setup.yml
playbooks. This means the funcitonality of "os-swift-install.yml"
remains unchanged.
Adjust the run-playbooks.sh so that it calls the new overarching swift
playbook.
Change-Id: Ie2d8041b4bc46f092a96882fe3ca430be92195ed
Partially-Implements: blueprint multi-region-swift