<commit_before># cloud

If you haven't done so already:

	vagrant up node-1 node-2 node-3

### Topics covered

This is our foray into dynamic inventories and provisioning cloud instances.  This example shows the following concepts:

* ansible-vault
* inventory groups and child groups
* roles
* tagging
* include_vars
* conditionals
* seperate task files
* using mixed static/dynamic inventories
* using group_vars to set the remote user
* provisioning instances and using wait_for
* including playbooks within playbooks
* using extra vars


### Requirements

You'll need your AWS credentials configured either in ```$HOME/.boto``` or set in environment variables.  You'll also need your AWS ssh-key in your keychain (using ssh-add).  

### General flow

We also wanto to show how to use extra vars, so there is a ansible-vaulted file named secrets.yml, with the password of: ```password```.  Changing this will override the test message on the web pages.

Will also have to discuss why this provisioning is a two step procedure and how ec2_groups are named

You'll also have to override my key_name parameter for the infra role to something that you actually have -- you could that with extra vars or by sending the parameter to the role.


Once that is setup, just run:
<commit_msg>doc update.<commit_after># cloud

If you haven't done so already:

	vagrant up node-1 node-2 node-3

### Topics covered

This is our foray into dynamic inventories and provisioning cloud instances.  This example shows the following concepts:

* ansible-vault
* inventory groups and child groups
* roles
* tagging
* include_vars
* conditionals
* seperate task files
* using mixed static/dynamic inventories
* using group_vars to set the remote user
* provisioning instances and using wait_for
* including playbooks within playbooks
* using extra vars


### Requirements

You'll need your AWS credentials configured either in ```$HOME/.boto``` or set in environment variables.  You'll also need your AWS ssh key in your keychain (using ssh-add).  

### General flow

Show how ec2.py creates the groups.  Show some of the settings for ec2.ini.

We make some changes to the inventory/hosts file, basically creating aliases for the groups that line up with the groups that are created with ec2.py.  This allows use to use the same playbook in both environments, but only having to change the inventory file.  

We also wanto to show how to use extra vars, so there is a ansible-vaulted file named secrets.yml, with the password of: ```password```.  Changing this will override the test message on the web pages.

You'll also have to override my key_name parameter for the infra role to something that you actually have -- you could that with extra vars or by sending the parameter to the role.


Once that is setup, just run:

{'fraction_non_alphanumeric': 0.053475935828877004, 'fraction_numerical': 0.0035650623885918, 'mean_word_length': 4.225325884543762, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7212985', 'n_tokens_mistral': 745, 'n_tokens_neox': 717, 'n_words': 413}