Skip to content
This repository has been archived by the owner. It is now read-only.

fix exercise 3 sample yaml #291

Merged
merged 2 commits into from Mar 26, 2018
Merged

fix exercise 3 sample yaml #291

merged 2 commits into from Mar 26, 2018

Conversation

@mk2
Copy link
Contributor

@mk2 mk2 commented Mar 1, 2018

I have faced some invalid sample yaml codes in exercise 3. So, fixed them.

  1. apache_webserver_port is missing. (but used in the template)
  2. {% raw %} is not needed.

When I have learned ansible by the lightbulb at Redhat JP (Ansible MokuMoku Kai #1), found them. Thanks Redhat JP Experts.

Copy link
Contributor

@liquidat liquidat left a comment

Thanks for catching the missing variable. However, the raw tag is still needed for the export to github pages.

Loading

@@ -48,22 +48,21 @@ Add a play definition and some variables to your playbook. These include addtio
- mod_wsgi
apache_test_message: This is a test message
apache_max_keep_alive_requests: 115
apache_webserver_port: 80
Copy link
Contributor

@liquidat liquidat Mar 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good catch, thanks!

Loading

@@ -175,6 +173,7 @@ Your new, improved playbook is done! Let's take a second look to make sure every
- mod_wsgi
apache_test_message: This is a test message
apache_max_keep_alive_requests: 115
apache_webserver_port: 80
Copy link
Contributor

@liquidat liquidat Mar 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is a good catch as well.

Loading

```

### Step 3

Add a new task called *httpd packages are present*:

```yml
{% raw %}
Copy link
Contributor

@liquidat liquidat Mar 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, as of right now we need the {% raw %} tag to be able to export to github pages properly. Without the raw tag, the double curly brackets are not properly formatted.

Loading

tasks:
- name: Ensure httpd packages are present
yum:
name: "{{ item }}"
state: present
with_items: "{{ httpd_packages }}"
notify: restart-apache-service
{% endraw %}
Copy link
Contributor

@liquidat liquidat Mar 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, as of right now we need the {% raw %} tag to be able to export to github pages properly. Without the raw tag, the double curly brackets are not properly formatted.

Loading

@@ -164,7 +163,6 @@ handlers:
Your new, improved playbook is done! Let's take a second look to make sure everything looks the way you intended. If not, now is the time for us to fix it up. The figure below shows line counts and spacing.

```yml
{% raw %}
Copy link
Contributor

@liquidat liquidat Mar 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, as of right now we need the {% raw %} tag to be able to export to github pages properly. Without the raw tag, the double curly brackets are not properly formatted.

Loading

@@ -211,7 +210,6 @@ Your new, improved playbook is done! Let's take a second look to make sure every
service:
name: httpd
state: restarted
{% endraw %}
Copy link
Contributor

@liquidat liquidat Mar 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, as of right now we need the {% raw %} tag to be able to export to github pages properly. Without the raw tag, the double curly brackets are not properly formatted.

Loading

@tima
Copy link
Collaborator

@tima tima commented Mar 21, 2018

@mk2 I agree with @liquidat -- we need those raw tags for (eventually) publishing to Github Pages which we hope to do soon. Please revert those changes in your PR so we can merge the other changes.

Loading

@mk2
Copy link
Contributor Author

@mk2 mk2 commented Mar 26, 2018

@tima Thanks reviewing. I have reverted the raw/endraw deletion, and committed.

Loading

@tima
Copy link
Collaborator

@tima tima commented Mar 26, 2018

Thanks for your help @mk2.

Loading

@tima tima merged commit e62499c into ansible:master Mar 26, 2018
1 check passed
Loading
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants