Repository: trailofbits/algo

Issue #14705: ERROR! couldn't resolve module/action 'vultr_firewall_group'.
Created: 2024-03-12T22:33:05Z
Describe the bug
I am getting an error while trying to run algo for the Vultr setup.
This is the error:
TASK [Include a provisioning role] ******************************************************************************************
ERROR! couldn't resolve module/action 'vultr_firewall_group'. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in '/home/tayler/Documents/Algo_vpn/algo/roles/cloud-vultr/tasks/main.yml': line 6, column 7, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- block:
    - name: Creating a firewall group
      ^ here


It appears at the very end of the setup processes.
To Reproduce
I am running Debian 12.
I follow the setup guide exactly:

setup an account with vultr.
enable and save the api key in the vultr.ini file created from running nano ~/.vultr.ini. in the format:

[default]
key = <your api key>


For example  (this a fake api key) :

[default]
key = DWHF39RHFO3UDHF39O


git clone the algo repo.
run the sudo apt install -y --no-install-recommends python3-virtualenv file lookup command for Debian.
cd into the algo directory and run the python3 -m virtualenv --python="$(command -v python3)" .env && source .env/bin/activate && python3 -m pip install -U pip virtualenv && python3 -m pip install -r requirements.txt command.
configure the config.cfg file with the users I want. I didnt change anything else in that file.
then start the deployment by running ./algo.

In the deployment:

I select 7 for Vultr.
give the server a name (aglo_server or something).
then select n for all the other options.

Then i get the error that I listed above..
Full log after running ./algo


PLAY [localhost] ************************************************************************************************************

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

TASK [Playbook dir stat] ****************************************************************************************************
ok: [localhost]

TASK [Ensure Ansible is not being run in a world writable directory] ********************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}
[DEPRECATION WARNING]: Use 'ansible.utils.ipaddr' module instead. This feature will be removed from ansible.netcommon in a 
release after 2024-01-01. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
[WARNING]: The value '' is not a valid IP address or network, passing this value to ipaddr filter might result in breaking
change in future.

TASK [Ensure the requirements installed] ************************************************************************************
ok: [localhost]

TASK [Set required ansible version as a fact] *******************************************************************************
ok: [localhost] => (item=ansible==9.1.0)

TASK [Just get the list from default pip] ***********************************************************************************
ok: [localhost]

TASK [Verify Python meets Algo VPN requirements] ****************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Verify Ansible meets Algo VPN requirements] ***************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}
[WARNING]: Found variable using reserved name: no_log

PLAY [Ask user for the input] ***********************************************************************************************

TASK [Gathering Facts] ******************************************************************************************************
ok: [localhost]
[Cloud prompt]
What provider would you like to use?
    1. DigitalOcean
    2. Amazon Lightsail
    3. Amazon EC2
    4. Microsoft Azure
    5. Google Compute Engine
    6. Hetzner Cloud
    7. Vultr
    8. Scaleway
    9. OpenStack (DreamCompute optimised)
    10. CloudStack (Exoscale optimised)
    11. Linode
    12. Install to existing Ubuntu latest LTS server (for more advanced users)
  
Enter the number of your desired provider
:

TASK [Cloud prompt] *********************************************************************************************************
ok: [localhost]

TASK [Set facts based on the input] *****************************************************************************************
ok: [localhost]
[VPN server name prompt]
Name the vpn server
[algo]
:

TASK [VPN server name prompt] ***********************************************************************************************
ok: [localhost]
[Cellular On Demand prompt]
Do you want macOS/iOS clients to enable "Connect On Demand" when connected to cellular networks?
[y/N]
:

TASK [Cellular On Demand prompt] ********************************************************************************************
ok: [localhost]
[Wi-Fi On Demand prompt]
Do you want macOS/iOS clients to enable "Connect On Demand" when connected to Wi-Fi?
[y/N]
:

TASK [Wi-Fi On Demand prompt] ***********************************************************************************************
ok: [localhost]
[Retain the PKI prompt]
Do you want to retain the keys (PKI)? (required to add users in the future, but less secure)
[y/N]
:

TASK [Retain the PKI prompt] ************************************************************************************************
ok: [localhost]
[DNS adblocking prompt]
Do you want to enable DNS ad blocking on this VPN server?
[y/N]
:

TASK [DNS adblocking prompt] ************************************************************************************************
ok: [localhost]
[SSH tunneling prompt]
Do you want each user to have their own account for SSH tunneling?
[y/N]
:

TASK [SSH tunneling prompt] *************************************************************************************************
ok: [localhost]

TASK [Set facts based on the input] *****************************************************************************************
ok: [localhost]

PLAY [Provision the server] *************************************************************************************************

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

--> Please include the following block of text when reporting issues:

Algo running on: Debian GNU/Linux 12 (bookworm)
Created from git clone. Last commit: ebf127d Use cheapest EC2 instance as default (#14536)
Python 3.11.2
Runtime variables:
    algo_provider "vultr"
    algo_ondemand_cellular "False"
    algo_ondemand_wifi "False"
    algo_ondemand_wifi_exclude "X251bGw="
    algo_dns_adblocking "False"
    algo_ssh_tunneling "False"
    wireguard_enabled "True"
    dns_encryption "True"

TASK [Display the invocation environment] ***********************************************************************************
changed: [localhost]

TASK [Install the requirements] *********************************************************************************************
ok: [localhost]

TASK [Generate the SSH private key] *****************************************************************************************
ok: [localhost]

TASK [Generate the SSH public key] ******************************************************************************************
ok: [localhost]

TASK [Copy the private SSH key to /tmp] *************************************************************************************
ok: [localhost]

TASK [Include a provisioning role] ******************************************************************************************
ERROR! couldn't resolve module/action 'vultr_firewall_group'. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in '/home/tayler/Documents/Algo_vpn/algo/roles/cloud-vultr/tasks/main.yml': line 6, column 7, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- block:
    - name: Creating a firewall group
      ^ here


Additional Notes
This appears to be a problem with the Ansible version, maybe? But I using the version the is specified in algo's requirements.txt.
Also there is this depreciation warning in the log I posted above:
[DEPRECATION WARNING]: Use 'ansible.utils.ipaddr' module instead. This feature will be removed from ansible.netcommon in a 
release after 2024-01-01. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
[WARNING]: The value '' is not a valid IP address or network, passing this value to ipaddr filter might result in breaking
change in future.

Duplicate issue #14709: algo fails to deploy on Vultr
Created: 2024-03-16T19:12:06Z
To Reproduce
Steps to reproduce the behavior:

Set Vultr api key ini .ini file as described here
run ./algo
choose required options
choose vltr as target
(see full log below) ERROR! couldn't resolve module/action 'vultr_firewall_group'. This often indicates a misspelling, missing collection, or incorrect module path.

Full log
➜  algo git:(master) ./algo           

PLAY [localhost] *****************************************************************************************************************************************************

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

TASK [Playbook dir stat] *********************************************************************************************************************************************
ok: [localhost]

TASK [Ensure Ansible is not being run in a world writable directory] *************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}
[DEPRECATION WARNING]: Use 'ansible.utils.ipaddr' module instead. This feature will be removed from ansible.netcommon in a release after 2024-01-01. Deprecation 
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
[WARNING]: The value '' is not a valid IP address or network, passing this value to ipaddr filter might result in breaking change in future.

TASK [Ensure the requirements installed] *****************************************************************************************************************************
ok: [localhost]

TASK [Set required ansible version as a fact] ************************************************************************************************************************
ok: [localhost] => (item=ansible==9.1.0)

TASK [Just get the list from default pip] ****************************************************************************************************************************
ok: [localhost]

TASK [Verify Python meets Algo VPN requirements] *********************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Verify Ansible meets Algo VPN requirements] ********************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}
[WARNING]: Found variable using reserved name: no_log

PLAY [Ask user for the input] ****************************************************************************************************************************************

TASK [Gathering Facts] ***********************************************************************************************************************************************
ok: [localhost]
[Cloud prompt]
What provider would you like to use?
    1. DigitalOcean
    2. Amazon Lightsail
    3. Amazon EC2
    6. Microsoft Azure
    7. Google Compute Engine
    8. Hetzner Cloud
    9. Vultr
    10. Scaleway
    11. OpenStack (DreamCompute optimised)
    12. CloudStack (Exoscale optimised)
    13. Linode
    14. Install to existing Ubuntu latest LTS server (for more advanced users)
  
Enter the number of your desired provider
:

TASK [Cloud prompt] **************************************************************************************************************************************************
ok: [localhost]

TASK [Set facts based on the input] **********************************************************************************************************************************
ok: [localhost]
[VPN server name prompt]
Name the vpn server
[algo]
:

TASK [VPN server name prompt] ****************************************************************************************************************************************
ok: [localhost]
[Cellular On Demand prompt]
Do you want macOS/iOS clients to enable "Connect On Demand" when connected to cellular networks?
[y/N]
:

TASK [Cellular On Demand prompt] *************************************************************************************************************************************
ok: [localhost]
[Wi-Fi On Demand prompt]
Do you want macOS/iOS clients to enable "Connect On Demand" when connected to Wi-Fi?
[y/N]
:

TASK [Wi-Fi On Demand prompt] ****************************************************************************************************************************************
ok: [localhost]
[Trusted Wi-Fi networks prompt]
List the names of any trusted Wi-Fi networks where macOS/iOS clients should not use "Connect On Demand"
(e.g., your home network. Comma-separated value, e.g., HomeNet,OfficeWifi,AlgoWiFi)
:

TASK [Trusted Wi-Fi networks prompt] *********************************************************************************************************************************
ok: [localhost]
[Retain the PKI prompt]
Do you want to retain the keys (PKI)? (required to add users in the future, but less secure)
[y/N]
:

TASK [Retain the PKI prompt] *****************************************************************************************************************************************
ok: [localhost]
[DNS adblocking prompt]
Do you want to enable DNS ad blocking on this VPN server?
[y/N]
:

TASK [DNS adblocking prompt] *****************************************************************************************************************************************
ok: [localhost]
[SSH tunneling prompt]
Do you want each user to have their own account for SSH tunneling?
[y/N]
:

TASK [SSH tunneling prompt] ******************************************************************************************************************************************
ok: [localhost]

TASK [Set facts based on the input] **********************************************************************************************************************************
ok: [localhost]

PLAY [Provision the server] ******************************************************************************************************************************************

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

--> Please include the following block of text when reporting issues:

Algo running on: macOS 14.3.1
Created from git clone. Last commit: 0d1be72 Fix hetzner module (#14698)
Python 3.11.0
Runtime variables:
    algo_provider "vultr"
    algo_ondemand_cellular "True"
    algo_ondemand_wifi "True"
    algo_ondemand_wifi_exclude "X251bGw="
    algo_dns_adblocking "True"
    algo_ssh_tunneling "False"
    wireguard_enabled "True"
    dns_encryption "True"

TASK [Display the invocation environment] ****************************************************************************************************************************
changed: [localhost]

TASK [Install the requirements] **************************************************************************************************************************************
ok: [localhost]

TASK [Generate the SSH private key] **********************************************************************************************************************************
ok: [localhost]

TASK [Generate the SSH public key] ***********************************************************************************************************************************
ok: [localhost]

TASK [Copy the private SSH key to /tmp] ******************************************************************************************************************************
ok: [localhost]

TASK [Include a provisioning role] ***********************************************************************************************************************************
ERROR! couldn't resolve module/action 'vultr_firewall_group'. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in '[REDACTED]/algo/roles/cloud-vultr/tasks/main.yml': line 6, column 7, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- block:
    - name: Creating a firewall group
      ^ here

Closing comment (2024-03-16T19:13:47Z): Duplicates #14705