"value":"\n <p>Let's start at the beginning.<\/p>\n\n<p>If we want to automate our infrastructure then we first need to create it. This could be done manually or we can automate it.<\/p>\n\n<p>Popular tools for this include Terraform and Pulumi, but Ansible also includes modules to interface with hosting providers such as Amazon Web Services, Microsoft Azure, DigitalOcean, and Linode.<\/p>\n\n<p>By using one of these tools, you can programatically provision a new, blank server that is ready for you to be configered.<\/p>\n\n<p>For example, to <a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/collections\/community\/digitalocean\/digital_ocean_module.htm\">create a DigitalOcean droplet<\/a>:<\/p>\n\n<pre><code class=\"language-yaml\">---\n- community.digitalocean.digital_ocean_droplet:\n image: ubuntu-20-04-x64\n name: mydroplet\n oauth_token: \"...\"\n region: sfo3\n size: s-1vcpu-1gb\n ssh_keys: [ .... ]\n state: present\n wait_timeout: 500\n register: my_droplet\n<\/code><\/pre>\n\n<p>Running this playbook will create a new Droplet with the specified name, size, and operating system, and within the specified region.<\/p>\n\n<p>If you needed to create a separate database server or another server for a new environment, then the file can be updated and re-run.<\/p>\n\n<p><a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/collections\/amazon\/aws\/ec2_instance_module.html#ansible-collections-amazon-aws-ec2-instance-module\">Creating an Amazon EC2 instance<\/a> looks very similar:<\/p>\n\n<pre><code class=\"language-yaml\">---\n- amazon.aws.ec2_instance:\n image_id: ami-123456\n instance_type: c5.large\n key_name: \"prod-ssh-key\"\n name: \"public-compute-instance\"\n network:\n assign_public_ip: true\n security_group: default\n vpc_subnet_id: subnet-5ca1ab1e\n<\/code><\/pre>\n\n<p>This doesn't apply just to servers - you can also use Ansible to create security groups and S3 buckets, manage SSH keys, firewalls, and load balancers.<\/p>\n\n<p>Once we have our infrastructure in place, we can start using Ansible to set and manage its configuration, which we'll do in tomorrow's email.<\/p>\n\n<hr \/>\n\n<p>Want to learn more about how I use Ansible? <a href=\"https:\/\/www.oliverdavies.uk\/ansible-course\">Register for my upcoming free email course<\/a>.<\/p>\n\n ",
"processed":"\n <p>Let's start at the beginning.<\/p>\n\n<p>If we want to automate our infrastructure then we first need to create it. This could be done manually or we can automate it.<\/p>\n\n<p>Popular tools for this include Terraform and Pulumi, but Ansible also includes modules to interface with hosting providers such as Amazon Web Services, Microsoft Azure, DigitalOcean, and Linode.<\/p>\n\n<p>By using one of these tools, you can programatically provision a new, blank server that is ready for you to be configered.<\/p>\n\n<p>For example, to <a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/collections\/community\/digitalocean\/digital_ocean_module.htm\">create a DigitalOcean droplet<\/a>:<\/p>\n\n<pre><code class=\"language-yaml\">---\n- community.digitalocean.digital_ocean_droplet:\n image: ubuntu-20-04-x64\n name: mydroplet\n oauth_token: \"...\"\n region: sfo3\n size: s-1vcpu-1gb\n ssh_keys: [ .... ]\n state: present\n wait_timeout: 500\n register: my_droplet\n<\/code><\/pre>\n\n<p>Running this playbook will create a new Droplet with the specified name, size, and operating system, and within the specified region.<\/p>\n\n<p>If you needed to create a separate database server or another server for a new environment, then the file can be updated and re-run.<\/p>\n\n<p><a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/collections\/amazon\/aws\/ec2_instance_module.html#ansible-collections-amazon-aws-ec2-instance-module\">Creating an Amazon EC2 instance<\/a> looks very similar:<\/p>\n\n<pre><code class=\"language-yaml\">---\n- amazon.aws.ec2_instance:\n image_id: ami-123456\n instance_type: c5.large\n key_name: \"prod-ssh-key\"\n name: \"public-compute-instance\"\n network:\n assign_public_ip: true\n security_group: default\n vpc_subnet_id: subnet-5ca1ab1e\n<\/code><\/pre>\n\n<p>This doesn't apply just to servers - you can also use Ansible to create security groups and S3 buckets, manage SSH keys, firewalls, and load balancers.<\/p>\n\n<p>Once we have our infrastructure in place, we can start using Ansible to set and manage its configuration, which we'll do in tomorrow's email.<\/p>\n\n<hr>\n\n<p>Want to learn more about how I use Ansible? <a href=\"https:\/\/www.oliverdavies.uk\/ansible-course\">Register for my upcoming free email course<\/a>.<\/p>\n\n ",