You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.
Able to deploy an ec2 instance onto aws but the public ip gives me back the default PuPHPet page. I am still unable to get to my host page www.bxs.test . I consistently get back a default puphpet page or this :
Vagrantfile-aws
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'aws'
provider = data['vm']['provider']['aws']
machines = !provider['machines'].empty? ? provider['machines'] : { }
machines.each do |i, machine|
config.vm.define "#{machine['id']}" do |machine_id|
machine_id.vm.box = 'dummy'
machine_id.vm.hostname = "#{machine['hostname']}"
machine_id.nfs.functional = false
machine_id.vm.provider :aws do |aws, override|
aws.access_key_id = "#{provider['access_key_id']}"
aws.secret_access_key = "#{provider['secret_access_key']}"
aws.keypair_name = "#{machine['keypair_name']}"
override.ssh.private_key_path = "#{machine['private_key_path']}"
override.ssh.username = "#{machine['ssh_username']}"
aws.region = "#{machine['region']}"
aws.instance_type = "#{machine['instance_type']}"
aws.ami = "#{machine['ami']}"
if machine['subnet_id'].to_s != ''
aws.subnet_id = "#{machine['subnet_id']}"
end
if machine['elastic_ip'].to_s != ''
aws.elastic_ip = "#{machine['elastic_ip']}"
end
if !machine['security_groups'].empty?
aws.security_groups = machine['security_groups']
end
aws.tags = {}
if machine.key?('tags')
machine['tags'].each do |key, tag|
aws.tags.store(key, tag)
end
end
end
data['vm']['synced_folder'].each do |i, folder|
if folder['source'] != '' && folder['target'] != ''
machine_id.vm.synced_folder "#{folder['source']}", "#{folder['target']}",
id: "#{i}"
end
end
machine_id.vm.provision 'shell' do |s|
s.path = 'puphpet/shell/initial-setup.sh'
end
machine_id.vm.provision :shell,
:inline => 'chmod +x /opt/puphpet/standalone-puppet.sh'
machine_id.vm.provision 'shell' do |s|
s.path = 'puphpet/shell/install-puppet.sh'
end
machine_id.vm.provision :shell do |s|
s.path = 'puphpet/shell/execute-files.sh'
s.args = ['exec-preprovision']
end
machine_id.vm.provision :puppet do |puppet|
ssh_username = !machine['ssh_username'].nil? ? machine['ssh_username'] : 'vagrant'
puppet.facter = {
'fqdn' => "#{machine_id.vm.hostname}",
'ssh_username' => "#{ssh_username}",
'provisioner_type' => ENV['VAGRANT_DEFAULT_PROVIDER'],
}
puppet.manifests_path = "#{data['vm']['provision']['puppet']['manifests_path']}"
puppet.manifest_file = ""
puppet.module_path = data['vm']['provision']['puppet']['module_path']
if !data['vm']['provision']['puppet']['options'].empty?
puppet.options = data['vm']['provision']['puppet']['options']
end
end
machine_id.vm.provision :shell do |s|
s.path = 'puphpet/shell/execute-files.sh'
s.args = ['exec-once', 'exec-always']
end
machine_id.vm.provision :shell, run: 'always' do |s|
s.path = 'puphpet/shell/execute-files.sh'
s.args = ['startup-once', 'startup-always']
end
machine_id.vm.provision :shell, privileged: false do |s|
s.path = 'puphpet/shell/execute-files.sh'
s.args = ['exec-once-unprivileged', 'exec-always-unprivileged']
end
machine_id.vm.provision :shell, run: 'always', privileged: false do |s|
s.path = 'puphpet/shell/execute-files.sh'
s.args = ['startup-once-unprivileged', 'startup-always-unprivileged']
end
machine_id.vm.provision :shell, privileged: false do |s|
s.path = 'puphpet/shell/important-notices.sh'
end
if !data['ssh']['port'].nil? && data['ssh']['port'].to_bool
machine_id.ssh.port = "#{data['ssh']['port']}"
end
if !data['ssh']['shell'].nil?
machine_id.ssh.shell = "#{data['ssh']['shell']}"
end
end
end
I'm fairly certain those unable to resolve host ip-xxx-xx-xx-xxx messages are a result of not having a fix like devopsgroup-io/vagrant-hostmanager#86 (comment) in Vagrantfile-aws so that vagrant-hostmanager knows to use the EC2 external IP for your local /etc/hosts entry.
rasha-hantash
changed the title
vagrant-was: unable to resolve host ip-xxx-xx-xx-xxx (using puphpet)
vagrant-was: unable to run aws without getting default puphpet page back
Jul 31, 2020
I'm fairly certain those unable to resolve host ip-xxx-xx-xx-xxx messages are a result of not having a fix like devopsgroup-io/vagrant-hostmanager#86 (comment) in Vagrantfile-aws so that vagrant-hostmanager knows to use the EC2 external IP for your local /etc/hosts entry.
For whatever reason that didn't resolve my issue - I probably implemented it incorrectly.
I was able to resolve it by running vagrant up --no-provision and then vagrant ssh to modify the etc/hosts file by adding 127.01.1 ip-xx-xx-xx and this exiting the box and running vagrant provision
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Able to deploy an ec2 instance onto aws but the public ip gives me back the default PuPHPet page. I am still unable to get to my host page www.bxs.test . I consistently get back a default puphpet page or this :
Vagrantfile-aws
config-aws.yaml
The text was updated successfully, but these errors were encountered: