diff options
| -rw-r--r-- | ansible/roles/munin/defaults/main.yml | 2 | ||||
| -rw-r--r-- | ansible/roles/munin/vars/main.yml | 68 | 
2 files changed, 68 insertions, 2 deletions
| diff --git a/ansible/roles/munin/defaults/main.yml b/ansible/roles/munin/defaults/main.yml deleted file mode 100644 index 8fbc7dc..0000000 --- a/ansible/roles/munin/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -munin_node_custom_plugins: {} diff --git a/ansible/roles/munin/vars/main.yml b/ansible/roles/munin/vars/main.yml new file mode 100644 index 0000000..dedfb46 --- /dev/null +++ b/ansible/roles/munin/vars/main.yml @@ -0,0 +1,68 @@ +--- +munin_node_custom_plugins: +  lovering_inheritance: | +    #!/usr/bin/env python3 +    # Ansible managed + +    import datetime +    import random +    import sys + +    if sys.argv[-1] == "autoconf": +        print("no") +        sys.exit(0) + +    if sys.argv[-1] == "config": + +        print("""\ +    graph_title Lovering Inheritance +    graph_args --base 1000 -l 0 +    graph_vlabel £ +    graph_category people +    graph_info This graph shows the insurance that Chris can cash out. +    graph_total Total +    savings.label Savings +    savings.info Base inheritance money Chris paid into his account in 2024 +    savings.draw AREASTACK +    interest.label Interest +    interest.info Amount of money gained from interest on the base amount +    interest.draw AREASTACK +    inherited.label Inherited money +    inherited.info Amount inherited from deaths of friends, family and victims +    inherited.draw AREASTACK\ +        """) +        sys.exit(0) + +    # Fixed seed to ensure that the bank jitter is constant +    random.seed(1234) +    today = datetime.date.today() +    savings = 740 +    interest_per_day = 0.01 +    insurance_policy_start = datetime.date(2024, 8, 28) +    days_griefed = (today - insurance_policy_start).days +    accrued_interest = 0 +    for _ in range(days_griefed): +        bank_jitter = random.random() +        accrued_interest += bank_jitter * (interest_per_day * (savings + accrued_interest)) + +    inherited_money = 0 + +    if days_griefed > 10: +        # Hassan declared as KIA (he had stocks in Big Oil) +        inherited_money += 10000 + +    if days_griefed > 60: +        # Death of Joe (prospect of sale of stolen GPUs) +        inherited_money += 5000 + +    if days_griefed > 170: +        # Bella disappears (spent all on chicken and gifts for his wife) +        inherited_money += 300 + +    if days_griefed > 360: +        # Lola Banks deploys her Titan missile but burns herself to death +        inherited_money += 12000 + +    print(f"savings.value {savings}") +    print(f"interest.value {accrued_interest}") +    print(f"inheritance.value {inherited_money}") | 
