Skip to content

Commit

Permalink
Previous documentation was that booleans were defined as yes/ no (a…
Browse files Browse the repository at this point in the history
…nsible-community/community-topics#116).  This was changed in ansible/ansible#78921 to use `true`/ `false`.

Do not use release candidates or alpha releases in Jenkinsfiles
  • Loading branch information
Dougal Seeley committed Oct 8, 2023
1 parent 57b963f commit a49bcee
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Ansible Collection - dseeley.blockdevmap

An Ansible module (or python script) to map cloud-specific (AWS, GCP and Azure) block device names (e.g. /dev/sdf) with the volume provided to the OS.

An Ansible module to map cloud-specific (AWS, GCP, Azure, LibVirt) block device names (e.g. /dev/sdf) with the volume provided to the OS.

## Output
### Common
Expand Down Expand Up @@ -31,13 +30,13 @@ This can be run as an Ansible module (needs root):
- name: Get block device map information for cloud
blockdevmap:
cloud_type: <gcp|aws|azure>
become: yes
become: true
register: r__blockdevmap

- name: Get lsblk device map information
blockdevmap:
cloud_type: lsblk
become: yes
become: true
register: r__blockdevmap

- name: debug blockdevmap
Expand Down
4 changes: 2 additions & 2 deletions galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ readme: README.md
authors:
- Dougal Seeley <github@dougalseeley.com>

description: An Ansible module to map cloud-specific (AWS, GCP and Azure) block device names (e.g. /dev/sdf) with the volume provided to the OS.
description: An Ansible module to map cloud-specific (AWS, GCP, Azure, LibVirt) block device names (e.g. /dev/sdf) with the volume provided to the OS.

#license:
#- BSD-3-Clause

license_file: 'LICENSE'

tags: ['aws', 'gcp', 'azure', 'storage', 'system']
tags: ['aws', 'gcp', 'azure', 'libvirt', 'storage', 'system']

dependencies: {}

Expand Down
2 changes: 1 addition & 1 deletion jenkinsfiles/Jenkinsfile_release_tag
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def PROJECT_URL_DEFAULT = "https://github.com/dseeley/blockdevmap"
def PROJECT_BRANCH_DEFAULT = "master" //Set the default git branch to use if we're not running an SCM job (e.g. if we're copying/pasting into a pipeline script)

def pypi_ansible = ["curl", "-s", "-H", "Accept: application/json", "-H", "Content-type: application/json", "GET", "https://pypi.org/pypi/ansible/json"].execute().text
def pypi_ansible_latest = new groovy.json.JsonSlurper().parseText(pypi_ansible).releases.keySet()[-1]
def pypi_ansible_latest = new groovy.json.JsonSlurper().parseText(pypi_ansible).info.version // Use `info.version` instead of `.releases.keySet()[-1]`, to avoid alpha and release candidate versions

//This allows us to create our own Docker image for this specific use-case. Once it is built, it will not be rebuilt, so only adds delay the first time we use it.
def create_custom_image(image_name, build_opts = "") {
Expand Down
2 changes: 1 addition & 1 deletion jenkinsfiles/Jenkinsfile_release_tag__auto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!groovy

def pypi_ansible = ["curl", "-s", "-H", "Accept: application/json", "-H", "Content-type: application/json", "GET", "https://pypi.org/pypi/ansible/json"].execute().text
def pypi_ansible_latest = new groovy.json.JsonSlurper().parseText(pypi_ansible).releases.keySet()[-1]
def pypi_ansible_latest = new groovy.json.JsonSlurper().parseText(pypi_ansible).info.version // Use `info.version` instead of `.releases.keySet()[-1]`, to avoid alpha and release candidate versions

node {
stage('Call ansible/blockdevmap-release-tag') {
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/blockdevmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
- name: Get block device map information for cloud provider
blockdevmap:
cloud_type: <gcp|aws|azure|libvirt>
become: yes
become: true
register: r__blockdevmap
- name: Get lsblk device map information
blockdevmap:
cloud_type: lsblk
become: yes
become: true
register: r__blockdevmap
- name: debug blockdevmap
Expand Down

0 comments on commit a49bcee

Please sign in to comment.