Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding exercise 1.7 #2084

Merged
merged 2 commits into from
Feb 7, 2024
Merged

adding exercise 1.7 #2084

merged 2 commits into from
Feb 7, 2024

Conversation

rlopez133
Copy link
Contributor

SUMMARY

Update Exercise 1.7

ISSUE TYPE
  • Docs Pull Request
COMPONENT NAME
  • docs

Copy link

@leogallego leogallego left a comment

Choose a reason for hiding this comment

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

The role name apache_server is later called just apache.
The rest looks good!


### Step 2 - Create a Basic Role Directory Structure
We'll develop a role named `apache_server` to install, configure, and manage Apache.

Choose a reason for hiding this comment

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

The role name apache_server is later called just apache.

[student@ansible-1 ansible-files]$ mkdir roles
[student@ansible-1 ansible-files]$ ansible-galaxy init --offline roles/apache_vhost
[student@ansible-1 lab_inventory]$ mkdir roles
[student@ansible-1 lab_inventory]$ ansible-galaxy init --offline roles/apache

Choose a reason for hiding this comment

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

The role name apache_server is later called just apache.

### Step 4 - Create the handler

Create the handler in the file `roles/apache_vhost/handlers/main.yml` to restart httpd when notified by the template task:
Embed the `apache_server` role in a playbook named `deploy_apache.yml` within `/home/student/lab_inventory` to apply it to your 'web' group hosts (node1, node2, node3).

Choose a reason for hiding this comment

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

The role name apache_server is later called just apache.

hosts: web
become: true
roles:
- apache

Choose a reason for hiding this comment

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

The role name apache_server is later called just apache.

@rlopez133 rlopez133 merged commit 6a96971 into ansible:devel Feb 7, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants