You've already forked ansible-role-common
Compare commits
4 Commits
v1.1.2
...
af2a57fb62
| Author | SHA1 | Date | |
|---|---|---|---|
| af2a57fb62 | |||
| c776b9bdab | |||
| 779e10bf4c | |||
| 24b1721e8c |
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
#cache: 'pip' # caching pip dependencies
|
||||
cache: 'pip' # caching pip dependencies
|
||||
- name: Ensure requirements are installed
|
||||
run: pip install -r requirements.txt
|
||||
- name: Lint with ansible-lint
|
||||
@@ -43,7 +43,7 @@ jobs:
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
#cache: 'pip' # caching pip dependencies
|
||||
cache: 'pip' # caching pip dependencies
|
||||
|
||||
- name: Ensure requirements are installed
|
||||
run: pip install -r requirements.txt
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Common [](https://ci.cybercinch.nz/repos/8)
|
||||
# Common [](https://hub.cybercinch.nz/cybercinch/ansible-role-common/actions?workflow=ci.yml)
|
||||
=========
|
||||
|
||||
A brief description of the role goes here.
|
||||
|
||||
@@ -67,7 +67,8 @@ $COLOR_COLUMN- Hostname$RESET_COLORS............: $COLOR_VALUE $HOSTNAME $RESET_
|
||||
{% if common_show_ipv6 == true %}
|
||||
$COLOR_COLUMN- IP Address (Main v4)$RESET_COLORS: $COLOR_VALUE $IP $RESET_COLORS
|
||||
$COLOR_COLUMN- IP Address (Main v6)$RESET_COLORS: $COLOR_VALUE $IP6 $RESET_COLORS
|
||||
{% else %} $COLOR_COLUMN- IP Address (Default)$RESET_COLORS: $COLOR_VALUE $IP $RESET_COLORS
|
||||
{% else %}
|
||||
$COLOR_COLUMN- IP Address (Default)$RESET_COLORS: $COLOR_VALUE $IP $RESET_COLORS
|
||||
{% endif %}
|
||||
{% if ansible_distribution == "Alpine" %}
|
||||
$COLOR_COLUMN- Release$RESET_COLORS.............: $COLOR_VALUE Alpine `/usr/bin/env cat /etc/os-release` $RESET_COLORS
|
||||
@@ -88,7 +89,7 @@ $COLOR_COLUMN- System uptime$RESET_COLORS.......: $COLOR_VALUE $upDays days $upH
|
||||
{% if ansible_virtualization_type != "lxc" %}
|
||||
$COLOR_COLUMN- Disk space$RESET_COLORS..........: "
|
||||
for FS in ${FILESYSTEMS}; do
|
||||
echo -e " $COLOR_COLUMN- ..........$RESET_COLORS..........: $COLOR_VALUE `df -H ${FS} | grep -v 'Filesystem' | grep -v '^[[:space:]]*$' | awk '{print $6 \" \" $4}'` remaining $RESET_COLORS"
|
||||
echo -e "$COLOR_COLUMN- ..........$RESET_COLORS..........: $COLOR_VALUE `df -H ${FS} | grep -v 'Filesystem' | grep -v '^[[:space:]]*$' | awk '{print $6 \" \" $4}'` remaining $RESET_COLORS"
|
||||
done
|
||||
{% endif %}
|
||||
echo -e "
|
||||
|
||||
22
terraform/.terraform.lock.hcl
generated
22
terraform/.terraform.lock.hcl
generated
@@ -1,22 +0,0 @@
|
||||
# This file is maintained automatically by "terraform init".
|
||||
# Manual edits may be lost in future updates.
|
||||
|
||||
provider "registry.terraform.io/linode/linode" {
|
||||
version = "1.16.0"
|
||||
constraints = "1.16.0"
|
||||
hashes = [
|
||||
"h1:JpBtHnebAi6yr/aDdlk8EybaEiEY+VPtFP3o0QoMTng=",
|
||||
"zh:03c867440797b82012cd5d97f58fef5885dc0248683227299a39af836df222db",
|
||||
"zh:0486be7f72d6ea73d10140e23be8c1d2772b2d8be28c7bb39c73be83601405cf",
|
||||
"zh:181929d6880cac6500f4af1f3799385c47ccd69872cacf1042a3a48e445b2b02",
|
||||
"zh:18b7f6cc1ddf86e28322638607e1f84c1e9d56824c26903e22d4d12352f20b6e",
|
||||
"zh:4e65e7f9e17c334ff7047fc2dd8fc479c2509cba66834d89e2033a45e9275fe3",
|
||||
"zh:6077eda3fdf77a5158d9dc1a0c38492e23f7d679b1ac96382ba92ebe92e19266",
|
||||
"zh:642e7c96867c519176d84228a7f9104352212ae3c999b409eee1076b7ed90a96",
|
||||
"zh:6451f5117125fad9884214fe2f2635a2bed95912e64cf1c66a57c38558dfe907",
|
||||
"zh:83b957b30da19586393b9aea2cc93524a7d4c43dd07d11129a11d29c2b4bfb21",
|
||||
"zh:852954fe6cfe5278bd7c3d1079a9832bbf8c58436486489ed85154c0a0600633",
|
||||
"zh:a2385c51147a3c40707f7bfceb673c077e1054e8af6fb4c808cef56f995b8193",
|
||||
"zh:d21cd5cb5a635d18547430fe6cdfe3c6898541f9f3adc110edbf8d6e0439390d",
|
||||
]
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
variable "drone_instances" {
|
||||
description = "How many runner instances should there be?"
|
||||
default = 3
|
||||
}
|
||||
variable "root_pass" {
|
||||
description = "Root password to set on the node"
|
||||
}
|
||||
|
||||
variable "linode_api_token" {
|
||||
description = "Linode API Token"
|
||||
}
|
||||
|
||||
variable "ssh_pubkey" {
|
||||
description = "SSH key to be allowed access by default"
|
||||
}
|
||||
|
||||
terraform {
|
||||
required_providers {
|
||||
linode = {
|
||||
source = "linode/linode"
|
||||
version = "1.16.0"
|
||||
}
|
||||
}
|
||||
backend "local" {
|
||||
path = "/data/runner.tfstate"
|
||||
}
|
||||
}
|
||||
|
||||
provider "linode" {
|
||||
token = var.linode_api_token
|
||||
}
|
||||
|
||||
resource "linode_instance" "terraform-drone" {
|
||||
connection {
|
||||
type = "ssh"
|
||||
user = "root"
|
||||
password = var.root_pass
|
||||
host = self.ip_address
|
||||
}
|
||||
|
||||
count = var.drone_instances
|
||||
image = "private/15818922"
|
||||
label = "drone-runner-${count.index + 1}"
|
||||
group = "docker"
|
||||
tags = ["tag_Testing","docker"]
|
||||
region = "ap-southeast"
|
||||
type = "g6-standard-2"
|
||||
authorized_keys = [ var.ssh_pubkey ]
|
||||
root_pass = var.root_pass
|
||||
|
||||
provisioner "remote-exec" {
|
||||
inline = [
|
||||
"yum upgrade -y && systemctl restart docker",
|
||||
"docker rm -f runner",
|
||||
"docker run --detach --volume=/var/run/docker.sock:/var/run/docker.sock --env=DRONE_RPC_PROTO=https --env=DRONE_RPC_HOST=drone.guise.net.nz --env=DRONE_RPC_SECRET=super-duper-secret --env=DRONE_RUNNER_CAPACITY=2 --env=DRONE_RUNNER_NAME=drone-runner-${count.index + 1} --env=DRONE_RUNNER_LABELS='linodrone:true' --env=--publish=3000:3000 --restart=always --name=runner drone/drone-runner-docker:1"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user