Skip to content

Instantly share code, notes, and snippets.

View loncarales's full-sized avatar

Aleš Lončar loncarales

View GitHub Profile
@loncarales
loncarales / HOWTO.md
Created May 26, 2020 21:36
Ansible Inventory Grapher

Getting started

$ pip install ansible-inventory-grapher

# DOT files are stored in ./graphs folder
$ ansible-inventory-grapher -i hosts.ini -d graphs -o loncar_net.dot --visible-vars=ansible_host --visible-vars=ansible_user loncar_net

# The resulting graphs can then be converted to pngs using this command. Assuming the DOT files are stored in graphs folder
$ for f in graphs/*.dot ; do dot -Tpng -o graphs/`basename $f .dot`.png $f; done
@loncarales
loncarales / Using Apache Maven Deploy Plugin.sh
Last active July 7, 2020 11:38
Manually upload Maven artefacts to Artifactory the easy way
# Upload the package
mvn -s user-settings.xml deploy:deploy-file \
-Durl=https://artifactory.hostname.com/maven-release \
-DrepositoryId=central \
-Dfile="my-package-1.0.0.zip" \
-DgroupId=com.package.my \
-DartifactId=my-package \
-Dversion=1.0.0 \
-Dpackaging=zip \
-DgeneratePom=false
@loncarales
loncarales / Configure .npmrc with authentication token.groovy
Last active November 3, 2023 20:01
Jenkins: configure .npmrc with authentication token to access the private npm Registry on Nexus
stage('NPM: Config') {
withCredentials([usernamePassword(credentialsId: nexusCredentialsId, passwordVariable: 'NEXUS_PASSWORD', usernameVariable: 'NEXUS_USERNAME')]) {
def token = sh(returnStdout: true, script: "set +x && curl -s -k -H \"Accept: application/json\" -H \"Content-Type:application/json\" -X PUT --data '{\"name\": \"$NEXUS_USERNAME\", \"password\": \"$NEXUS_PASSWORD\"}' https://nexus-repository.net:8088/repository/my-npm/-/user/org.couchdb.user:$NEXUS_USERNAME 2>&1 | grep -Po '(?<=\"token\":\")[^\"]*'")
sh "set +x && echo \"//nexus-repository.net:8088/repository/my-npm/:_authToken=$token\" >> .npmrc"
}
}
@loncarales
loncarales / ansible-summary.md
Created June 28, 2020 09:51 — forked from andreicristianpetcu/ansible-summary.md
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@loncarales
loncarales / Ansible way
Last active July 8, 2020 17:18
Let's look at a simple example. Let's say we would like to test if some set of packages were installed within the role.
---
- name: Verify
hosts: all
tasks:
- name: Gather the package manager facts
package_facts:
manager: auto
@loncarales
loncarales / angular-cli-node-js-typescript-compatiblity-matrix.csv
Created April 6, 2021 08:52 — forked from LayZeeDK/angular-cli-node-js-typescript-rxjs-compatiblity-matrix.csv
Angular CLI, Angular, Node.js, and TypeScript compatibility matrix. Based on changelogs, metadata, and hands-on experience.
Angular CLI version Angular version Node.js version TypeScript version
- 2.x 6.0.x or later minor version 2.0.x
1.0.6 4.0.x/4.1.x 6.9.x or later minor version 2.2.x
1.1.3 4.0.x/4.1.x 6.9.x or later minor version 2.3.x
1.2.7 4.0.x/4.1.x 6.9.x or later minor version 2.3.x
1.3.2 4.2.x/4.3.x/4.4.x 6.9.x or later minor version 2.4.x
1.4.10 4.2.x/4.3.x/4.4.x 6.9.x/8.9.x or later minor version 2.4.x
1.5.6 5.0.x/5.1.x 6.9.x/8.9.x or later minor version 2.4.x/2.5.x
1.6.7 5.2.x 6.9.x/8.9.x or later minor version 2.5.x
1.7.4 5.2.x 6.9.x/8.9.x or later minor version 2.5.x
{
"basics": {
"name": "Ales Loncar",
"image": "https://resume.loncar.net/picture.png",
"label": "Senior Cloud & DevOps Engineer | Automation Specialist",
"summary": "Accomplished freelance Cloud and DevOps Engineer with 20+ years of experience delivering production-grade, cloud-native, containerized, and automated solutions. Specializes in infrastructure as code, CI/CD pipelines, platform engineering, and DevSecOps practices to streamline deployment, enhance security, and improve developer experience. Combines a software engineering mindset with deep DevOps expertise to architect and implement scalable, secure, and resilient platforms. Passionate about automation, continuous improvement, and mentoring teams in modern engineering practices.",
"headline": "Freelance Cloud & DevOps Engineer | Platform Engineer | Kubernetes | CI/CD | DevSecOps",
"keywords": [
"Cloud",
"DevOps",
@loncarales
loncarales / config.ign
Last active April 18, 2026 20:40 — forked from DenisKramer/gist:641acdba305e2a311b9b5b6c29c3d4bb
Simple CoreOS Ignition Config with username:password
{
"ignition": {
"version": "3.0.0"
},
"passwd": {
"users": [
{
"name": "core",
"passwordHash": "$6$rounds=4096$NxaeyFQ5iHofiyD1$nCts0MNF5fFPdVMTCqu.OA3H1MM7w/vqtXPrjwUUrutWDe1ylyaL7shyTB.M8Berc81K9ZNV1W4NevWmtplZq.",
"sshAuthorizedKeys": [