Skip to content

Commit 99f67c6

Browse files
committed
remove slurm_openstack_tools collection
1 parent 5f7e48f commit 99f67c6

File tree

16 files changed

+252
-18
lines changed

16 files changed

+252
-18
lines changed

ansible/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,7 @@ roles/*
7676
!roles/pulp_site/**
7777
!roles/doca/
7878
!roles/doca/**
79+
!roles/slurm_stats/
80+
!roles/slurm_stats/**
81+
!roles/pytools/
82+
!roles/pytools/**

ansible/monitoring.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,10 @@
1717
- name: Setup slurm stats
1818
hosts: slurm_stats
1919
tags: slurm_stats
20-
collections:
21-
- stackhpc.slurm_openstack_tools
2220
tasks:
2321
- include_role:
2422
name: slurm-stats
25-
apply:
26-
# Collection currently requires root for all tasks.
27-
become: true
23+
become: true
2824

2925
- name: Deploy filebeat
3026
hosts: filebeat

ansible/roles/pytools/.travis.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
language: python
3+
python: "2.7"
4+
5+
# Use the new container infrastructure
6+
sudo: false
7+
8+
# Install ansible
9+
addons:
10+
apt:
11+
packages:
12+
- python-pip
13+
14+
install:
15+
# Install ansible
16+
- pip install ansible
17+
18+
# Check ansible version
19+
- ansible --version
20+
21+
# Create ansible.cfg with correct roles_path
22+
- printf '[defaults]\nroles_path=../' >ansible.cfg
23+
24+
script:
25+
# Basic role syntax check
26+
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
27+
28+
notifications:
29+
webhooks: https://galaxy.ansible.com/api/v1/notifications/

ansible/roles/pytools/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
stackhpc.slurm_openstack_tools.pytools
2+
=========
3+
4+
Installs python-based tools from https://github.com/stackhpc/slurm-openstack-tools.git into `/opt/slurm-tools/bin/`.
5+
6+
Requirements
7+
------------
8+
9+
Role Variables
10+
--------------
11+
12+
`pytools_editable`: Optional. Whether to install the package using `pip`'s editable mode (installing source to `/opt/slurm-tools/src`) - `true` or `false` (default).
13+
`pytools_gitref`: Optional. Git branch, version, commit etc to install. Default `master`.
14+
`pytools_user`: User to install as. Default `root`.
15+
16+
Dependencies
17+
------------
18+
None.
19+
20+
Example Playbook
21+
----------------
22+
23+
- hosts: compute
24+
tasks:
25+
- import_role:
26+
name: stackhpc.slurm_openstack_tools.pytools
27+
28+
29+
License
30+
-------
31+
32+
Apache-2.0
33+
34+
Author Information
35+
------------------
36+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
# defaults file for pytools
3+
pytools_editable: false
4+
pytools_gitref: master
5+
pytools_user: root
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
# handlers file for pytools
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
galaxy_info:
2+
author: your name
3+
description: your role description
4+
company: your company (optional)
5+
6+
# If the issue tracker for your role is not on github, uncomment the
7+
# next line and provide a value
8+
# issue_tracker_url: http://example.com/issue/tracker
9+
10+
# Choose a valid license ID from https://spdx.org - some suggested licenses:
11+
# - BSD-3-Clause (default)
12+
# - MIT
13+
# - GPL-2.0-or-later
14+
# - GPL-3.0-only
15+
# - Apache-2.0
16+
# - CC-BY-4.0
17+
license: license (GPL-2.0-or-later, MIT, etc)
18+
19+
min_ansible_version: 2.1
20+
21+
# If this a Container Enabled role, provide the minimum Ansible Container version.
22+
# min_ansible_container_version:
23+
24+
#
25+
# Provide a list of supported platforms, and for each platform a list of versions.
26+
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
27+
# To view available platforms and versions (or releases), visit:
28+
# https://galaxy.ansible.com/api/v1/platforms/
29+
#
30+
# platforms:
31+
# - name: Fedora
32+
# versions:
33+
# - all
34+
# - 25
35+
# - name: SomePlatform
36+
# versions:
37+
# - all
38+
# - 1.0
39+
# - 7
40+
# - 99.99
41+
42+
galaxy_tags: []
43+
# List tags for your role here, one per line. A tag is a keyword that describes
44+
# and categorizes the role. Users find roles by searching for tags. Be sure to
45+
# remove the '[]' above, if you add tags to this list.
46+
#
47+
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
48+
# Maximum 20 tags per role.
49+
50+
dependencies: []
51+
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
52+
# if you add dependencies to this list.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
- name: install python3
3+
package:
4+
name: python3,git
5+
become: true
6+
7+
- name: Create virtualenv directory
8+
file:
9+
path: /opt/slurm-tools
10+
owner: "{{ pytools_user }}"
11+
group: "{{ pytools_user }}"
12+
state: directory
13+
become: true
14+
15+
- block:
16+
- name: Upgrade pip
17+
# This needs to a separate step so that we use the updated version
18+
# to install the packages below.
19+
pip:
20+
name: pip
21+
22+
- name: Create virtualenv
23+
pip:
24+
name: "git+https://github.com/stackhpc/slurm-openstack-tools.git@{{ pytools_gitref }}#egg=slurm_openstack_tools"
25+
editable: "{{ pytools_editable }}"
26+
27+
module_defaults:
28+
ansible.builtin.pip:
29+
virtualenv: /opt/slurm-tools
30+
virtualenv_command: python3 -m venv
31+
state: latest
32+
become: true
33+
become_user: "{{ pytools_user }}"
34+
# become_flags: -H #'-s /bin/bash' # as has shell specified as /sbin/nologin
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
localhost
2+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
- hosts: localhost
3+
remote_user: root
4+
roles:
5+
- pytools

0 commit comments

Comments
 (0)