I'm aware of that behaviour, I wouls till like to supply environment variables per-host, especially for one-time tasks. Creating a whole config file for that purpose is definitely excessive.
On Mon, May 6, 2019 at 12:39 AM Lee Hambley <[email protected]> wrote: > Hi Francesco, > > If you have server specific configuration, our standard advice would be to > roll that out and deploy it as part of your server configuration > management, then the Capistrano tooling can work correctly in the context > of the environment where it is being used. > > The documentation here > https://capistranorb.com/documentation/faq/why-does-something-work-in-my-ssh-session-but-not-in-capistrano/ > has > a nice graphic to help you understand which files Capistrano may load, and > why, when. > > Lee Hambley > http://lee.hambley.name/ > +49 (0) 170 298 5667 > > > On Sat, 4 May 2019 at 08:50, Francesco Belladonna < > [email protected]> wrote: > >> Versions: >> >> - Ruby 2.6 >> - Capistrano 3.11 >> - Rake 12.3, Rails 4 >> >> Platform: >> >> - Working on Ubuntu >> - Deploying to Ubuntu server >> >> >> Is there any way to set different default_env per host? My capistrano >> deploys to 4 different servers (exactly the same application), but I need >> to run a rake task on all 4 hosts with a few different environment >> variables per-host, including rails migrations (it's not the DB config). >> >> Ideallly I'd like to avoid storing the env variables in a file because >> I'm already storing those in the systemd config >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Capistrano" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web, visit >> https://groups.google.com/d/msgid/capistrano/0c6b412d-d355-42d3-acc8-b603cc22cbcb%40googlegroups.com >> <https://groups.google.com/d/msgid/capistrano/0c6b412d-d355-42d3-acc8-b603cc22cbcb%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "Capistrano" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/capistrano/hiha6TXqp-A/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web, visit > https://groups.google.com/d/msgid/capistrano/CAN_%2BVLWjd_4ZZu7pPfTLiO0O7YFHGyoEby4ObN6w_WB-r_jqJQ%40mail.gmail.com > <https://groups.google.com/d/msgid/capistrano/CAN_%2BVLWjd_4ZZu7pPfTLiO0O7YFHGyoEby4ObN6w_WB-r_jqJQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Capistrano" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/CANE%2BHSq5a6gy5yf_g8Lyf0GHHerHt5QweJhy-Zh48V4ow%3DuMug%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
