[Charlotte-pm] Is there an Ansible solution to this deployment process?

William McKee william at knowmad.com
Thu Aug 26 19:22:57 PDT 2021


Yanick,

Thank you for the step-by-step guide to Ansible deployment. I'm starting to
see the general outline of the solution, and I still need some
clarifications. Here's where I am now:

1. I only have 1 server that I need to deploy sites onto. Don't expect this
to change. Can I simplify the server setting along the following lines:

```
all:
  hosts:
    'knowmad.com':
      ansible_ssh_host: 192.168.0.1
      ansible_ssh_user: dancer
```

1a. What file do I put this information into? Does it belong in
`./playbooks/onboard.yml`?

1b. Since I'm not onboarding a server but rather using ansible to deploy a
new site within a multi-tenant web app, I may rename that file to
`./playbooks/deploy.yml`. Does that make sense? Or does this
sound confusing?

2. For the site specific configurations, I already have a perl script that
uses Template based config files to build the domain specific configuration
files needed for a new site. Perhaps I could replace that with Ansible +
jinja2 at a future date. I'd need to figure out how to pass in the domain
specific info when deploying a new site.

3. It appears that I'll need to build a new set of ansible tasks for each
domain. Yes? Or, is there a way to define placeholders that can be passed
into a task via the ansible command line?

4. Do I run the ansible client on my workstation and let it connect to the
server? Do I need to install any ansible components on the server or only
on my workstation? or both?

5. In addition to the site-specific files, I also need to push up any edits
to the Perl libs, etc. I'm currently using rsync to do so. Wondering if I
may be better off using ansible to manage the entire deployment process
to the server.


Thanks for your guidance. There's probably more questions but right now
I'll be happy to just get a basic script running that can push the files
into place on the server and setup the systemctl commands.


William
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/charlotte-pm/attachments/20210826/2babd93d/attachment.html>


More information about the Charlotte-pm mailing list