Comments (6)
Task step looks for a default VPC https://github.com/forem/selfhost/blob/main/playbooks/providers/aws.yml#L41-L50. If you deleted the default one it will be blank and fail.
You can comment lines 41 to 50:
- amazon.aws.ec2_vpc_net_info:
filters:
"isDefault": "true"
region: "{{ fcos_aws_region }}"
profile: "{{ fcos_aws_profile }}"
register: forem_vpc_info
- name: Set forem_vpc_id fact
ansible.builtin.set_fact:
forem_vpc_id: "{{ forem_vpc_info['vpcs'][0]['vpc_id'] }}"
and then just pass in the VPC ID (replace vpc-1212233445566
in the example below with your AWS VPC ID) from your account in the region you are using via an extra var:
ansible-playbook -i inventory/forem/setup.yml playbooks/providers/aws.yml -e forem_vpc_id=vpc-1212233445566
or use a region that still has a default VPC present.
from selfhost.
Hey @MakaryGo I am going to close this request for now. If you want, you can post on https://forem.dev any issues you are having with your VPC on your AWS account and maybe the community can offer more advice.
from selfhost.
It seemed to help, after changing region in /playbook/providers/aws.yml
Only now it crashes at another step:
TASK [Launch Forem instance for <redacted>] **********************************************************************
fatal: [forem]: FAILED! =>
msg: |-
The task includes an option with an undefined variable. The error was: No first item, sequence was empty.
The error appears to be in '/home/makarygo/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 }}"
from selfhost.
I think it is having issues because vpc_subnet_id: "{{ forem_subnet_info.subnets | map(attribute='id') | list | first }}"
expects a list of subnets.
- name: Gather info about VPC subnets
amazon.aws.ec2_vpc_subnet_info:
filters:
vpc-id: "{{ forem_vpc_id }}"
availability-zone: "{{ fcos_aws_region }}a"
region: "{{ fcos_aws_region }}"
profile: "{{ fcos_aws_profile }}"
register: forem_subnet_info
Should get that info but if your VPC that you are using doesn't have any subnets that most likely is a problem.
Debugging your AWS account is a bit beyond our scope here so I would see if you have a default VPC on this account in this region and if not, recreate it https://aws.amazon.com/premiumsupport/knowledge-center/deleted-default-vpc/ and just use the default one if you can't figure out what is going on with your subnets on your current AWS VPC.
from selfhost.
Yeah, I used this AWS account log time ago for deployment of different project, I will try to deploy with other provider. Thanks for assistance and sorry for stupid questions, just never worked with Ansible before.
from selfhost.
No worries and no problem @MakaryGo. I think if you just tried a different region in AWS and make sure you have a default VPC you will be off the to the races.
from selfhost.
Related Issues (20)
- bin/startup issue HOT 1
- The role 'preflight' was not found HOT 17
- Export to another vps HOT 2
- The first user registered and jumped directly to email verification? HOT 3
- S3 permissions not updated on repeated runs leads to server initialization error HOT 2
- Images not loading behind VPN HOT 3
- Can i add script in head tag? HOT 3
- Butane is not installed HOT 3
- DigitalOcean provider playbook: doctl compute image create step is not skipped & image creation always fails HOT 1
- Confirmation / Documentation of variables in setup.yml HOT 2
- SMTP email service is not working HOT 8
- ERROR! couldn't resolve module/action 'amazon.aws.ec2'. This often indicates a misspelling, missing collection, or incorrect module path. HOT 2
- Forem self-host with QEMU error
- setup.yml file is empty
- Failed to parse /root/selfhost/inventory/forem/setup.yml with ini plugin
- no able to connect with ssh HOT 1
- Failed to login using API token, please verify validity of API token HOT 1
- How to access my Forem droplet files trough sftp ?
- Using /bin/container-setup failed
- Link in Readme to paid hosting is broken. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from selfhost.