Closed imaginator closed 2 years ago
Hi,
thanks for your feedback.
I made some changes to the documentation. Is this now more helpful?
There is also no need for --extra-vars "target=production
. The deployment detects the type of deployment automatically with the server ip. This means. If the server IP matches production_ip
it will deploy the production setup. If the server IP matches staging_ip
it will deploy the staging setup. This is more safe, because it prevents you from deploying staging on production :-)
Thanks @HolgerHees. Am I correct to assume that you run with two copies of the repo:
Is there/would it make sense to just have one repo (on laptop) with the option to deploy to the remote server?
Yes, this works too, if you modify the server.ini as described in my changed wiki page.
If you want to deploy local staging and remote production i would recommend to have two server.ini files like
server_local.ini and server_production.ini
right - makes sense. I see you have most roles tagged so I'm not too worried about speed when just deploying using --tags
. Thanks for the documentation updates.
I was using parts of the repo to help build my own system. But now I'd like to also use the staging/production mix and migrate my ansible roles into this.
It's not clear in https://github.com/HolgerHees/smartserver/wiki/Setup:-Create#create-your-own-setup how to:
vagrant --config=demo --os=ubuntu up --provision
works and provisions to the VM running locally.sudo ansible-playbook -i config/demo/server.ini server.yml
will only run if I add the production IP to config/demo/server.ini.Point 5: copying files is unclear - copy
config/demo/
to the production server?Perhaps an example where we:
server.ini
,ansible-playbook -i config/demo/server.ini --extra-vars "target=production" server.yml
At least this would be my thinking after playing around with your setup very briefly. I might be missing something so take all of this with a grain of salt.