Skip to content

Commit

Permalink
Removed deprecated KeePass references from machine_operations role
Browse files Browse the repository at this point in the history
  • Loading branch information
AllRWeak committed Jul 31, 2024
1 parent bb78fb7 commit eb387a1
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 26 deletions.
2 changes: 1 addition & 1 deletion nova/core/galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace: nova
name: core

# The version of the collection. Must be compatible with semantic versioning
version: 3.1.15
version: 3.1.16

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
Expand Down
2 changes: 1 addition & 1 deletion nova/core/roles/deploy_vars/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
###################

# These are defined here because it's the first role loaded and these defaults will then be used for subsequent roles
# It's better to define different lookups (vault, keepass etc.) in this role because then they'll be loaded only once
# It's better to define different lookups (vault,etc.) in this role because then they'll be loaded only once

template: false # Set to yes to include the template role in start.yml
customization_context: host # Default value, Providentia also can give out type: container
Expand Down
4 changes: 4 additions & 0 deletions nova/core/roles/machine_operations/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ vmwarews_custom_params: []
# AWS defaults #
################

aws_access_key: {} # Can be defined in your Ansible Vault

# Temporary ssh key path on your container
temp_ssh_key_path: /tmp/{{ project_fullname | default('') }}_{{ inventory_hostname }}_aws_key

Expand Down Expand Up @@ -135,6 +137,8 @@ aws_security_group_rules:
# Linode defaults #
###################

linode_api_token: {} # Can be defined in your Ansible Vault

# The default root password for Linode VM
machine_operations_linode_vm_password: "{{ lookup('community.hashi_vault.hashi_vault', vault_lookup_fragment + 'secret=' + secrets_vault_engine_path + '/data/' + secrets_vault_secrets_path + ':' + inventory_hostname + '_' + admin_account) }}"
rebuild: false # Use ctp-rebuild alias to rebuild the VM with different size but keeping the data
18 changes: 6 additions & 12 deletions nova/core/roles/machine_operations/tasks/aws/main.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
---
- name: Checking for AWS API key...
when: aws_access_key is not defined or aws_access_key in [none, '']
block:
- name: MISSING AWS API KEY
ansible.builtin.debug:
msg: |
KEEPASS_AWS_ACCESS_KEY not defined in .makerc-vars.
or
aws_access_key_id and aws_access_key are not set in Ansible Vault.
- name: Stopping play...
ansible.builtin.meta: end_host
- name: Missing required variables...
ansible.builtin.fail:
msg: |
Following variables are required to run this role:
- aws_access_key
when: aws_access_key == {}

- name: Including {{ custom_vm_name | default(vm_name) }} removal tasks...
ansible.builtin.include_tasks: remove.yml
Expand Down
18 changes: 6 additions & 12 deletions nova/core/roles/machine_operations/tasks/linode/main.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
---
- name: Checking for Linode API token...
when: linode_api_token is not defined or linode_api_token in [none, '']
block:
- name: MISSING LINODE API TOKEN
ansible.builtin.debug:
msg: |
KEEPASS_LINODE_API_TOKEN not defined in .makerc-vars.
or
linode_api_token is not set in Ansible Vault.
- name: Stopping play...
ansible.builtin.meta: end_host
- name: Missing required variables...
ansible.builtin.fail:
msg: |
Following variables are required to run this role:
- linode_api_token
when: linode_api_token == {}

- name: Including {{ custom_vm_name | default(vm_name) }} rebuild tasks...
ansible.builtin.include_tasks: rebuild.yml
Expand Down

0 comments on commit eb387a1

Please sign in to comment.