Forem Creators and Builders 🌱

Discussion on: Selfhost forem

 
gary profile image
Shreehari

This is the output of the ansible-playbook command when run in verbose mode -

❯ ansible-playbook -i inventory/forem/setup.yml playbooks/providers/aws.yml -vvvvv

ansible-playbook [core 2.11.0] 
  config file = /home/sln/Downloads/selfhost/ansible.cfg
  configured module search path = ['/home/sln/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/sln/Downloads/venv-forem/lib/python3.8/site-packages/ansible
  ansible collection location = /home/sln/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/sln/Downloads/venv-forem/bin/ansible-playbook
  python version = 3.8.13 (default, Apr 19 2022, 02:32:06) [GCC 11.2.0]
  jinja version = 3.1.2
  libyaml = True
Using /home/sln/Downloads/selfhost/ansible.cfg as config file
Reading vault password file: /home/sln/.config/forem/selfhost_ansible_vault_password
setting up inventory plugins
Loading collection amazon.aws from /home/sln/.ansible/collections/ansible_collections/amazon/aws
Loading collection community.digitalocean from /home/sln/.ansible/collections/ansible_collections/community/digitalocean
redirecting (type: inventory) ansible.builtin.gcp_compute to google.cloud.gcp_compute
Loading collection google.cloud from /home/sln/.ansible/collections/ansible_collections/google/cloud
ansible_collections.amazon.aws.plugins.inventory.aws_ec2 declined parsing /home/sln/Downloads/selfhost/inventory/forem/setup.yml as it did not pass its verify_file() method
Skipping due to inventory source file name mismatch. The file name has to end with one of the following: do_hosts.yaml, do_hosts.yml digitalocean.yaml, digitalocean.yml, digital_ocean.yaml, digital_ocean.yml.
ansible_collections.community.digitalocean.plugins.inventory.digitalocean declined parsing /home/sln/Downloads/selfhost/inventory/forem/setup.yml as it did not pass its verify_file() method
ansible_collections.google.cloud.plugins.inventory.gcp_compute declined parsing /home/sln/Downloads/selfhost/inventory/forem/setup.yml as it did not pass its verify_file() method
host_list declined parsing /home/sln/Downloads/selfhost/inventory/forem/setup.yml as it did not pass its verify_file() method
script declined parsing /home/sln/Downloads/selfhost/inventory/forem/setup.yml as it did not pass its verify_file() method
Skipping empty key (hosts) in group (all)
Parsed /home/sln/Downloads/selfhost/inventory/forem/setup.yml inventory source with yaml plugin
Loading collection community.aws from /home/sln/.ansible/collections/ansible_collections/community/aws
Loading collection community.general from /home/sln/Downloads/venv-forem/lib/python3.8/site-packages/ansible_collections/community/general
redirecting (type: modules) community.aws.ec2_vpc_route_table_info to amazon.aws.ec2_vpc_route_table_info
redirecting (type: modules) community.aws.ec2_vpc_endpoint to amazon.aws.ec2_vpc_endpoint
redirecting (type: action) amazon.aws.aws_s3 to amazon.aws.s3_object
ERROR! couldn't resolve module/action 'amazon.aws.ec2'. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in '/home/sln/Downloads/selfhost/playbooks/providers/aws.yml': line 170, column 5, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


  - name: "Launch Forem instance for {{ app_domain }}"
    ^ here
We could be wrong, but this one looks like it might be an issue with
missing quotes. Always quote template expression brackets when they
start a value. For instance:

    with_items:
      - {{ foo }}

Should be written as:

    with_items:
      - "{{ foo }}"

Enter fullscreen mode Exit fullscreen mode
 
ce7in profile image
Muhammed Cetin

I couldn't find any problem in your aws.yml file. However, the problem might be in the setup.yml file. There should be a misspelling.

You can follow this path to catch the error:

  1. Use the original aws.yml file first. If everything is OK, the error is in this file.
  2. Otherwise, the problem is probably in the setup.yml file; examine it. Vault secrets, domain names, or other settings might be wrong.
  3. If you wouldn't be able to find any problem within setup.yml, think if you have changed anything else. Follow the changes.
 
gary profile image
Shreehari

Thanks for the help. Will try those. Since im trying forem.dev for the first time, i am facing such issues.

 
gary profile image
Shreehari

Hi Muhammed Cetin
I tried the used original aws.yml file but still getting the same error.

I am using ubuntu to deploy forem. According the the docs, i need to install butane, but not able to install butane in ubuntu. Is there any way to install it or other ways to delploy with production settings?

I tried the development version of the forem by installing ruby and other packages locally, it worked fine and was able to run it successfully.

Please do advice the process to deploy forem from ubuntu is different or do i need to stick to the developer documentation.

 
gary profile image
Shreehari

Was able to fix those errors after updating the aws.yml and referred this while updating - docs.ansible.com/ansible/latest/co...