Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kolla Ansible
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Very Demiurge Very Mindful
Kolla Ansible
Commits
c3906fab
Commit
c3906fab
authored
9 years ago
by
Jenkins
Committed by
Gerrit Code Review
9 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Sanity check module"
parents
2ffb35ee
d6f78f06
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docker/kolla-ansible/Dockerfile.j2
+1
-1
1 addition, 1 deletion
docker/kolla-ansible/Dockerfile.j2
docker/kolla-ansible/kolla_sanity.py
+59
-0
59 additions, 0 deletions
docker/kolla-ansible/kolla_sanity.py
with
60 additions
and
1 deletion
docker/kolla-ansible/Dockerfile.j2
+
1
−
1
View file @
c3906fab
...
...
@@ -49,7 +49,7 @@ RUN mkdir -p /etc/ansible /usr/share/ansible /home/ansible \
&& echo 'localhost ansible_connection=local' > /etc/ansible/hosts \
&& useradd --user-group ansible --groups kolla
COPY find_disks.py kolla_keystone_service.py kolla_keystone_user.py /usr/share/ansible/
COPY find_disks.py kolla_keystone_service.py kolla_keystone_user.py
kolla_sanity.py
/usr/share/ansible/
COPY ansible.cfg /home/ansible/.ansible.cfg
{{ include_footer }}
...
...
This diff is collapsed.
Click to expand it.
docker/kolla-ansible/kolla_sanity.py
0 → 100644
+
59
−
0
View file @
c3906fab
#!/usr/bin/python
# Copyright 2015 Intel corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This file is a barebones file needed to file a gap until Ansible 2.0. No
# error checking, no deletions, no updates. Idempotent creation only.
# If you look closely, you will see we arent _really_ using the shade module
# we just use it to slightly abstract the authentication model. As patches land
# in upstream shade we will be able to use more of the shade module. Until then
# if we want to be 'stable' we really need to be using it as a passthrough
import
shade
class
SanityChecks
(
object
):
@staticmethod
def
keystone
(
cloud
):
cloud
.
keystone_client
.
tenants
.
list
()
def
main
():
module
=
AnsibleModule
(
argument_spec
=
openstack_full_argument_spec
(
password
=
dict
(
required
=
True
,
type
=
'
str
'
),
project
=
dict
(
required
=
True
,
type
=
'
str
'
),
role
=
dict
(
required
=
True
,
type
=
'
str
'
),
user
=
dict
(
required
=
True
,
type
=
'
str
'
),
service
=
dict
(
required
=
True
,
type
=
'
str
'
),
)
)
try
:
changed
=
True
cloud
=
shade
.
operator_cloud
(
**
module
.
params
)
getattr
(
SanityChecks
,
module
.
params
.
pop
(
"
service
"
))(
cloud
)
module
.
exit_json
(
changed
=
changed
)
except
Exception
as
e
:
module
.
exit_json
(
failed
=
True
,
changed
=
True
,
msg
=
e
)
# import module snippets
from
ansible.module_utils.basic
import
*
from
ansible.module_utils.openstack
import
*
if
__name__
==
'
__main__
'
:
main
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment