Add linux.dell.com repo
This commit is contained in:
commit
5a236e6e30
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
language: python
|
||||
python: "2.7"
|
||||
|
||||
# Use the new container infrastructure
|
||||
sudo: false
|
||||
|
||||
# Install ansible
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- python-pip
|
||||
|
||||
install:
|
||||
# Install ansible
|
||||
- pip install ansible
|
||||
|
||||
# Check ansible version
|
||||
- ansible --version
|
||||
|
||||
# Create ansible.cfg with correct roles_path
|
||||
- printf '[defaults]\nroles_path=../' >ansible.cfg
|
||||
|
||||
script:
|
||||
# Basic role syntax check
|
||||
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
|
||||
|
||||
notifications:
|
||||
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
## v1.0.0
|
||||
|
||||
### Features
|
||||
* Add linux.dell.com repo
|
|
@ -0,0 +1,60 @@
|
|||
# Openmanage
|
||||
|
||||
1. [Overview](#overview)
|
||||
2. [Role Variables](#role-variables)
|
||||
3. [Example Playbook](#example-playbook)
|
||||
4. [Configuration](#configuration)
|
||||
5. [Development](#development)
|
||||
6. [License](#license)
|
||||
7. [Author Information](#author-information)
|
||||
|
||||
## Overview
|
||||
|
||||
A role to manage Openmanage installation and configuration.
|
||||
|
||||
## Role Variables
|
||||
|
||||
* **
|
||||
openmanage__repositories** : List of APT repositories that can provide OpenManage. Each entry is a dict [default : `See default/main.yml`].
|
||||
* **openmanage__base_packages** : List of base packages in order to provide Openmanage [default : `openmanage`].
|
||||
* **openmanage__deploy_state** : The desired state this role should achieve. [default : `absent`].
|
||||
|
||||
## Example Playbook
|
||||
|
||||
* Use defaults vars :
|
||||
|
||||
``` yaml
|
||||
- hosts: mynode.DOMAIN
|
||||
roles:
|
||||
- role: ipr-cnrs.openmanage
|
||||
tags: ['role::openmanage', 'ipr', 'idrac']
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
This role will :
|
||||
* Add an APT repository in order to provide OpenManage.
|
||||
|
||||
## Development
|
||||
|
||||
This source code comes from our [Gogs instance][openmanage source] and the [Github repo][openmanage github] exist just to be able to send the role to Ansible Galaxy…
|
||||
|
||||
But feel free to send issue/PR here :)
|
||||
|
||||
Thanks to this [hook][gogs to github hook], Github automatically got updates from our [Gogs instance][openmanage source] :)
|
||||
|
||||
## License
|
||||
|
||||
[WTFPL][wtfpl website]
|
||||
|
||||
## Author Information
|
||||
|
||||
Jérémy Gardais
|
||||
* Source : [on IPR's Gogs][openmanage source]
|
||||
* [IPR][ipr website] (Institut de Physique de Rennes)
|
||||
|
||||
[gogs to github hook]: https://stackoverflow.com/a/21998477
|
||||
[openmanage source]: https://git.ipr.univ-rennes1.fr/cellinfo/ansible.openmanage
|
||||
[openmanage github]: https://github.com/ipr-cnrs/openmanage
|
||||
[wtfpl website]: http://www.wtfpl.net/about/
|
||||
[ipr website]: https://ipr.univ-rennes1.fr/
|
|
@ -0,0 +1,50 @@
|
|||
---
|
||||
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
|
||||
|
||||
# ipr-cnrs.openmanage default variables [[[
|
||||
# ======================================
|
||||
|
||||
# Repository [[[
|
||||
# -----------------------------
|
||||
|
||||
# .. envvar:: openmanage__repositories [[[
|
||||
#
|
||||
# List of APT repositories (and related info such gpg keys) that can provide
|
||||
# OpenManage. Each entry is a dict that can be used to provide both
|
||||
# apt_repository and apt_key.
|
||||
#
|
||||
openmanage__repositories:
|
||||
# Version 910 - for Debian Stretch and Ubuntu Xenial
|
||||
- repo: 'deb http://linux.dell.com/repo/community/openmanage/910/{{ ansible_distribution_release }} {{ ansible_distribution_release }} main'
|
||||
filename: 'dell.openmanage'
|
||||
key_id: '1285491434D8786F'
|
||||
key_keyserver: 'pool.sks-keyservers.net'
|
||||
state: '{{ openmanage__deploy_state
|
||||
if (ansible_distribution_release in ["stretch", "xenial"])
|
||||
else "absent" }}'
|
||||
# Previous version for Debian until Jessie and Ubuntu until Trusty
|
||||
- repo: 'deb http://linux.dell.com/repo/community/debian/dists/{{ ansible_distribution_release }} {{ ansible_distribution_release }} openmanage'
|
||||
filename: 'dell.openmanage'
|
||||
key_id: '1285491434D8786F'
|
||||
key_keyserver: 'pool.sks-keyservers.net'
|
||||
state: '{{ openmanage__deploy_state
|
||||
if (ansible_distribution_release not in ["stretch", "xenial"])
|
||||
else "absent" }}'
|
||||
# ]]]
|
||||
# ]]]
|
||||
# Packages and installation [[[
|
||||
# -----------------------------
|
||||
|
||||
# .. envvar:: openmanage__deploy_state [[[
|
||||
#
|
||||
# What is the desired state which this role should achieve ? Possible options :
|
||||
#
|
||||
# ``present``
|
||||
# Default. Ensure that openmanage is installed and configured as requested.
|
||||
#
|
||||
# ``absent``
|
||||
# Ensure that openmanage is uninstalled and it's configuration is removed.
|
||||
#
|
||||
openmanage__deploy_state: 'absent'
|
||||
# ]]]
|
||||
# ]]]
|
|
@ -0,0 +1,16 @@
|
|||
galaxy_info:
|
||||
author: "Jérémy Gardais"
|
||||
description: "Setup Openmanage"
|
||||
license: WTFPL
|
||||
company: IPR
|
||||
issue_tracker_url: https://git.ipr.univ-rennes1.fr/cellinfo/ansible.netadata/issues
|
||||
min_ansible_version: 2.6
|
||||
platforms:
|
||||
- name: Debian
|
||||
versions:
|
||||
- stretch
|
||||
galaxy_tags:
|
||||
- system
|
||||
- openmanage
|
||||
- idrac
|
||||
- dell
|
|
@ -0,0 +1,35 @@
|
|||
---
|
||||
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
|
||||
#
|
||||
# tasks file for netdata
|
||||
|
||||
# Manage repository [[[1
|
||||
## Add repository
|
||||
- name: Add OpenManage repository
|
||||
apt_repository:
|
||||
update_cache: False
|
||||
repo: '{{ item.repo }}'
|
||||
mode: '{{ item.mode | d(omit) }}'
|
||||
filename: '{{ item.filename | d(omit) }}'
|
||||
state: '{{ item.state | d("present") }}'
|
||||
with_flattened:
|
||||
- '{{ openmanage__repositories }}'
|
||||
register: openmanage__register_repositories
|
||||
|
||||
## Add repository key
|
||||
- name: Add OpenManage repo key
|
||||
apt_key:
|
||||
url: '{{ item.key_url | d(omit) }}'
|
||||
id: '{{ item.key_id | d(omit) }}'
|
||||
keyserver: '{{ item.key_keyserver | d(omit) }}'
|
||||
with_flattened:
|
||||
- '{{ openmanage__repositories }}'
|
||||
register: openmanage__register_key
|
||||
|
||||
## Update cache
|
||||
- name: Update APT cache
|
||||
apt:
|
||||
update_cache: True
|
||||
when: (openmanage__deploy_state == "present") and
|
||||
(openmanage__register_repositories.changed or
|
||||
openmanage__register_key.changed)
|
|
@ -0,0 +1 @@
|
|||
localhost
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
- hosts: localhost
|
||||
remote_user: root
|
||||
roles:
|
||||
- openmanage
|
Loading…
Reference in New Issue