Hi Dan. I've just started using AWX today. Do you mind giving me a bit of
background on how you have set yours up?

We currently have no config mgmt for our server environment and for the
project I'm on (+ any other project) we will use Ansible to manage the
configuration changes. I've so far created a stack of playbooks, each
within their own sub directory which includes a vars folder, scripts where
necessary etc. I do however have a global inventory file that all plays
reference outside of the playbook sub directory. Running the required plays
via CLI has been fine for myself and I have all the playbook projects
listed as subfolders within a gitlab repo called playbooks.

Now that I want to use AWX so other people can manage the plays I'm
doubting whether my playbook structure is ideal, plus the fact from what
I've seen each playbook directory (app/service - e.g GIS, SQL) directory
requires an inventory file so AWX can reference it.

Do you have an inventory file in each playbook directory? All playbooks and
inventory in single directory and no sub folders to separate the plays?

Thanks in advance. Excuse typos... typed on mobile!

On Thu, 26 Jul 2018, 3:00 PM Dan Linder, <[email protected]> wrote:

> I'll jump in with with what we are doing.
>
> We have a Git server (GitHub on site, but it could be any sourcecode
> repository, local or hosted), and each of us have a copy of the repository
> in our test/dev environment.  Development on the files (playbooks, roles,
> vars, hosts, etc) are modified/pulled/pushed/etc just like any other source
> code.
>
> On my workstation I have my own hosts file that points to my small test
> environment (a few VMs spun up in the lab) that I can point the playbooks
> at.  When I get the playbooks working there, I push the code to the
> repository.  Then someone else pulls down the changes to their workstation
> and runs the playbooks against their test hosts.  (Or I can do the same
> with their updates.)
>
> When we're good with what we've produced, someone from the ops team pulls
> down the repo to their system which has access to the QA (pre-production)
> environment, runs the playbook in check mode to validate, then runs the
> playbook during the next change window.
>
> We also have Ansible Tower (RedHat supported version of AWX) which has
> jobs/templates setup that automatically check-out the repository to a
> temporary location on the Tower server, and run the playbook in that
> repository against a set of hosts with a specific set of credentials.  This
> way teams can setup their own host inventories on Tower, we can safely
> store credentials for Ansible to use to login to these systems (developers
> don't need the passwords in this case), and we have a job history log for
> review.
>
> On Wednesday, July 25, 2018 at 3:34:06 PM UTC-5, java_cat33 wrote:
>>
>> Thanks for your insight Jon. When you use WSL - are you pulling from your
>> source code repo from within the Ansible controller? You then just test and
>> edit the code directly on the controller?
>>
>> What do you use for a code repo? Hosted Gitlab?
>>
>>
>> On Thursday, July 26, 2018 at 1:17:11 AM UTC+12, J Hawkesworth wrote:
>>>
>>> I work in an windows environment too.
>>>
>>> Mostly I use Windows Subsystem for Linux (WSL) also known as Bash on
>>> Windows.  This lets me pull from our source code repo, edit and check in
>>> changes and run playbooks (ansible runs fine inside WSL), also you can use
>>> ansible-vault to encrypt your secrets so they never land in your source
>>> control.
>>>
>>> Sometimes I target VMs running in VirtualBox, other times I target vms
>>> in our dev environment.
>>>
>>> If you like vagrant you can run vagrant inside WSL and target virtualbox
>>> running on the windows 10 host after setting a couple of environment
>>> variables - see https://www.vagrantup.com/docs/other/wsl.html
>>>
>>> Mostly we just pull and update source code and then push changes.  This
>>> has worked fine for us.  When switching to a new version of ansible,
>>> typically I branch, make changes and test them before letting others test
>>> and use the new version of ansible.
>>>
>>> For test and production we have set up ansible in vms.  Its relatively
>>> straightforward to create a playbook to create an ansible controller on a
>>> freshly provisioned vm, so you can bootstrap the other ansible controllers
>>> from your dev machine if you need to.
>>>
>>> Hope this helps,
>>>
>>> Jon
>>>
>>> On Wednesday, July 25, 2018 at 12:02:42 AM UTC+1, java_cat33 wrote:
>>>>
>>>> I work in a Windows environment, pretty new to Ansible and keen to hear
>>>> how you perform version control on your playbooks, how you edit and test
>>>> them etc.
>>>>
>>>> Do you work in a team where you have multiple engineers editing and
>>>> creating new plays? You clone the master branch and then merge changes?
>>>>
>>>> If you clone to your local machine - then how do you edit and test and
>>>> deploy? Are you just copying the plays up to the Ansible host?
>>>>
>>>> I'm about to start building some projects in AWX - these projects will
>>>> connect to a git repo (GitLab) to pull the plays from a master branch.
>>>>
>>>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/ansible-project/WWc2OkcYTrY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/5985a735-e6f9-4126-a65a-6cfa0b62813a%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/5985a735-e6f9-4126-a65a-6cfa0b62813a%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 the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAH%3DqtGWDBcUN004%2BC622vqP0GyJeununuvLMfc%2BYnbhiH8ovDg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to