Skip to content

Commit

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

Do not use release candidates or alpha releases in Jenkinsfiles
  • Loading branch information
Dougal Seeley committed Oct 8, 2023
1 parent e7ac6ed commit 32c2d60
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This is run as an Ansible lookup:
hostname: "{{ esxi_ip }}"
username: "{{ esxi_username }}"
password: "{{ esxi_password }}"
validate_certs: False
validate_certs: false
hostnames: ['config.name']
keyed_groups: []

Expand All @@ -32,7 +32,7 @@ This is run as an Ansible lookup:
aws_access_key: "{{ aws_access_key }}"
aws_secret_key: "{{ aws_secret_key }}"
region: "{{ region }}"
validate_certs: False
validate_certs: false
keyed_groups: []

- name: Get proxmox inventory info
Expand All @@ -43,6 +43,6 @@ This is run as an Ansible lookup:
url: "https://192.168.1.70:8006"
user: root@pam
password: 'PASSWD'
validate_certs: False
want_facts: yes
validate_certs: false
want_facts: true
```
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/inventory_lookup"
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/inventory_lookup-release-tag') {
Expand Down
8 changes: 4 additions & 4 deletions plugins/lookup/inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
hostname: "{{ esxi_ip }}"
username: "{{ esxi_username }}"
password: "{{ esxi_password }}"
validate_certs: False
validate_certs: false
hostnames: ['config.name']
keyed_groups: []
Expand All @@ -47,7 +47,7 @@
aws_access_key: "{{ aws_access_key }}"
aws_secret_key: "{{ aws_secret_key }}"
region: "{{ region }}"
validate_certs: False
validate_certs: false
keyed_groups: []
- name: Get proxmox inventory info
Expand All @@ -58,8 +58,8 @@
url: "https://192.168.1.70:8006"
user: root@pam
password: 'PASSWD'
validate_certs: False
want_facts: yes
validate_certs: false
want_facts: true
"""

from ansible.errors import AnsibleOptionsError
Expand Down

0 comments on commit 32c2d60

Please sign in to comment.