Skip to content

Instantly share code, notes, and snippets.

View resmo's full-sized avatar
:octocat:

René Moser resmo

:octocat:
View GitHub Profile
@resmo
resmo / Caddyfile
Created May 26, 2022 10:16
Caddyfile
{
# TLS Options
email youremail@example.com
# auto_https disable_redirects
}
# see https://caddyserver.com/docs/caddyfile/directives/reverse_proxy
www.example.com {
route {
reverse_proxy {
@resmo
resmo / .gitlab-ci.yml
Created April 25, 2022 13:22
ansible gitlab ci
---
image: python:3.8-slim-bullseye
variables:
ANSIBLE_FORCE_COLOR: "true"
VIRTUAL_ENV: .venv
PIP_REQUIRE_VIRTUALENV: "true"
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache: &global_cache
@resmo
resmo / .gitlab-ci.yml
Created July 6, 2021 09:08
Gitlab CI for Ansible Projects
---
image: python:3.8-slim-buster
variables:
ANSIBLE_FORCE_COLOR: "true"
VIRTUAL_ENV: .venv
PIP_REQUIRE_VIRTUALENV: "true"
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache: &global_cache
@resmo
resmo / log.md
Last active August 20, 2020 12:43
role vars vs tasks vars

given a role "my-role" roles/my-role/main.yml

- name: run debug
  debug:
    msg: "{{ myvar }}"

playbook 1

Keybase proof

I hereby claim:

  • I am resmo on github.
  • I am resmo (https://keybase.io/resmo) on keybase.
  • I have a public key ASA0qpsCX9loqPeKThBcoEgliCmiJ7vH97lR5VmStIrrcwo

To claim this, I am signing this object:

#!/usr/bin/python
import base64
import os
SPEC_FILE = 'apb.yml'
DOCKERFILE = 'Dockerfile'
SPEC_LABEL = 'com.redhat.apb.spec'
@resmo
resmo / os_server_tag.yml
Created March 18, 2019 08:42
os_server_tag.yml
#!/usr/bin/python
# coding: utf-8 -*-
# (c) 2018, Artem Goncharov <artem.goncharov@gmail.com>
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
@resmo
resmo / ansible_integraion.md
Last active February 13, 2019 13:45
4.12.0.0RC2 failing tests

4.12.0.0RC2

PLAY [testhost] *****************************************************************************************************************************************************************

TASK [Gathering Facts] **********************************************************************************************************************************************************
ok: [testhost]

TASK [cs_firewall : network setup] **********************************************************************************************************************************************
changed: [testhost] =&gt; {"account": "admin", "acl": null, "acl_type": "Account", "api_http_method": "post", "api_key": "lI3Gkmf-597mszaynqHP9XPrdXteERxZ5a3MtGeA2xZdgrN1zxhNz2RcUlck8h_lPPEsUf6Xw66pCBwhTZwUNw", "api_region": "cloudstack", "api_timeout": "60", "api_url": "http://localhost:8888/client/api", "broadcast_domain_type": "Vlan", "changed": true, "cidr": "10.1.1.0/24", "display_text": "ansible test", "dns1": "10.147.28.7", "domain": "ROOT", "g
---
- hosts: localhost
tasks:
- name: exmaple block with when
when: 1 == 1
block:
- name: task 1
debug:
msg: run task
- name: task 2
- name: register template and wait max 5 min until ready
cs_template:
...
register: template
until: template.is_ready
retries: 60
delay: 5