Skip to content

Commit

Permalink
Merge pull request #2210 from ansible/devel
Browse files Browse the repository at this point in the history
Updating Main to latest AAP 2.5
  • Loading branch information
rlopez133 authored Nov 22, 2024
2 parents b50489c + 5450452 commit 9bfedab
Show file tree
Hide file tree
Showing 204 changed files with 4,135 additions and 2,583 deletions.
320 changes: 272 additions & 48 deletions README.md

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<div class="wrapper">
<header>
<div class="header-container">
<a href="https://ansible.com">
<a href="{{ '/' | relative_url }}">
<img
class="header-logo"
src="{{ '/assets/images/redhat-ansible-logo.svg' | relative_url }}"
Expand All @@ -42,19 +42,19 @@
/>
</a>
<a class="header-link" href="{{ '/' | relative_url }}">
Workshops Home
Workshops
</a>
<a class="header-link" href="{{ '/exercises/ansible_rhel/' | relative_url }}">
RHEL
<a class="header-link" href="https://ansible.github.io/slides">
Slide Finder
</a>
<a class="header-link" href="{{ '/exercises/ansible_network/' | relative_url }}">
Network
<a class="header-link" href="https://ansible.github.io/slides/ebooks">
E-Books
</a>
<a class="header-link" href="{{ '/exercises/ansible_windows/' | relative_url }}">
Windows
<a class="header-link" href="https://ansible.github.io/slides/customer_references">
Customer References
</a>
<a class="header-link" href="https://labs.demoredhat.com/webpages/aapcasc">
Config as Code
<a class="header-link" href="https://ansible.github.io/slides/datasheets">
Collateral
</a>
<a class="header-link" href="https://github.com/ansible/workshops/issues/new/choose">
Open an Issue
Expand Down
145 changes: 145 additions & 0 deletions assets/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -287,3 +287,148 @@ a h3 {
a h3:hover {
color: #5F0000;
}


@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@600;700&display=swap');

* {
box-sizing: border-box;
}

.page-contain {
display: flex;
flex-wrap: wrap; /* Allow wrapping if necessary */
align-items: stretch; /* Stretch items to the same height */
justify-content: center;
padding: 2em;
font-family: 'Open Sans', sans-serif;
}

.data-card {
display: flex;
flex-direction: column;
flex-grow: 1; /* Ensure cards take equal height */
flex-basis: 20.75em; /* Base size of each card */
max-width: 20.75em;
max-height: 27.0em;
overflow: hidden;
border-radius: .5em;
text-decoration: none !important; /* Remove underline from links */
background: white;
margin: 1em;
padding: 2.75em 2.5em;
box-shadow: 0 1.5em 2.5em -.5em rgba(0, 0, 0, .1);
transition: transform .45s ease, background .45s ease;
}

.data-card h3, .data-card h4, .data-card p, .data-card .link-text {
text-decoration: none; /* Ensure no underline on child elements */
}

.data-card h3 {
color: #2E3C40;
font-size: 2.2em;
font-weight: 600;
line-height: 1;
padding-bottom: .5em;
margin: 0 0 0.142857143em;
border-bottom: 2px solid #ee0000;
transition: color .45s ease, border .45s ease;
}

.data-card h4 {
color: #627084;
font-size: 1.125em;
font-weight: 700;
line-height: 1;
letter-spacing: 0.1em;
margin: 0 0 1.777777778em;
transition: color .45s ease;
}

.data-card p {
opacity: 0;
color: #FFFFFF;
font-weight: 600;
line-height: 1.5;
margin: 0 0 1.25em;
transform: translateY(-1em);
transition: opacity .45s ease, transform .5s ease;
}

.data-card .link-text {
display: block;
color: #ee0000;
font-size: 1.125em;
font-weight: 600;
line-height: 1.2;
margin: auto 0 0;
transition: color .45s ease;
}

.data-card .link-text svg {
margin-left: .5em;
transition: transform .6s ease;
}

.data-card .link-text svg path {
transition: fill .45s ease;
}

.data-card:hover {
background: #ee0000;
transform: scale(1.02);
}

.data-card:hover h3 {
color: #FFFFFF;
border-bottom-color: #5f0000;
}

.data-card:hover h4 {
color: #FFFFFF;
}

.data-card:hover p {
opacity: 1;
transform: none;
}

.data-card:hover .link-text {
color: #FFFFFF;
}

.data-card:hover .link-text svg {
animation: point 1.25s infinite alternate;
}

.data-card:hover .link-text svg path {
fill: #FFFFFF;
}

@keyframes point {
0% {
transform: translateX(0);
}
100% {
transform: translateX(.125em);
}
}


.cisco-image-container {
width: 800px; /* Set the width of the container */
height: 300px; /* Set the height of the container */
background-image: url("{{ site.baseurl }}/assets/images/cisco_workshops.png"); /* Image on hover */
background-size: cover; /* Cover the entire container */
background-position: center; /* Center the image */
transition: background-image 0.3s ease; /* Smooth transition */
}

.cisco-image-container:hover {
background-image: url("{{ site.baseurl }}/assets/images/cisco_workshops_tony.png"); /* Image on hover */
}

#website_explanation {
display: none;
}
Binary file modified decks/ansible_rhel.pdf
Binary file not shown.
30 changes: 25 additions & 5 deletions exercises/ansible_rhel/1.2-thebasics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,36 @@ and their respective groups.
"_meta": {
"hostvars": {
"ansible-1": {
"ansible_host": "3.236.186.92" },
"ansible_become": "true",
"ansible_host": "ansible-1.example.com",
"ansible_ssh_common_args": "-o StrictHostKeyChecking=no",
"ansible_ssh_private_key_file": "~/.ssh/8qnxkkey.pem",
"ansible_user": "ec2-user",
"timeout": 60
},
"node1": {
"ansible_host": "3.239.234.187"
"ansible_become": "true",
"ansible_host": "node1.example.com",
"ansible_ssh_common_args": "-o StrictHostKeyChecking=no",
"ansible_ssh_private_key_file": "~/.ssh/8qnxkkey.pem",
"ansible_user": "ec2-user",
"timeout": 60
},
"node2": {
"ansible_host": "75.101.228.151"
"ansible_become": "true",
"ansible_host": "node2.example.com",
"ansible_ssh_common_args": "-o StrictHostKeyChecking=no",
"ansible_ssh_private_key_file": "~/.ssh/8qnxkkey.pem",
"ansible_user": "ec2-user",
"timeout": 60
},
"node3": {
"ansible_host": "100.27.38.142"
"ansible_become": "true",
"ansible_host": "node3.example.com",
"ansible_ssh_common_args": "-o StrictHostKeyChecking=no",
"ansible_ssh_private_key_file": "~/.ssh/8qnxkkey.pem",
"ansible_user": "ec2-user",
"timeout": 60
}
}
},
Expand All @@ -86,7 +107,6 @@ and their respective groups.
]
}
}

```

NOTE: `-m` is short for `--mode` which allows for the mode to be switched to standard output instead of using the text-based user interface (TUI).
Expand Down
45 changes: 41 additions & 4 deletions exercises/ansible_rhel/1.3-playbook/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

In this exercise, you'll use Ansible to conduct basic system setup tasks on a
Red Hat Enterprise Linux server. You will become familiar with fundamental
Ansible modules like `dnf` and `user`, and learn how to create and run
Ansible modules like `package` and `user`, and learn how to create and run
playbooks.

## Guide
Expand Down Expand Up @@ -59,7 +59,7 @@ The basic structure looks as follows:
become: true
tasks:
- name: Update all security-related packages
ansible.builtin.dnf:
ansible.builtin.package:
name: '*'
state: latest
security: true
Expand All @@ -73,7 +73,7 @@ The basic structure looks as follows:
> NOTE: Updating the packages may take a few minutes prior to the Ansible playbook completing.
* About the `dnf` module: This module is used for package management with DNF (Dandified YUM) on RHEL and other Fedora-based systems.
* About the `package` module: This modules manages packages on a target without specifying a package manager module

* About the `user` module: This module is used to manage user accounts.

Expand All @@ -87,6 +87,24 @@ Execute your playbook using the `ansible-navigator` command:

Review the output to ensure each task is completed successfully.

```bash
PLAY [Basic System Setup] ******************************************************
TASK [Gathering Facts] *********************************************************
ok: [node1]
TASK [Update all security-related packages] ************************************
changed: [node1]
TASK [Create a new user] *******************************************************
changed: [node1]
PLAY RECAP *********************************************************************
node1 : ok=3 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
```


### Step 4 - Checking the Playbook
Now, let’s create a second playbook for post-configuration checks, named `system_checks.yml`:

Expand Down Expand Up @@ -115,10 +133,29 @@ Run the checks playbook:

Review the output to ensure the user creation was successful.

```bash
PLAY [System Configuration Checks] *********************************************
TASK [Gathering Facts] *********************************************************
ok: [node1]
TASK [Check user existence] ****************************************************
changed: [node1]
TASK [Report user status] ******************************************************
ok: [node1] => {
"msg": "User 'myuser' exists."
}
PLAY RECAP *********************************************************************
node1 : ok=3 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
```

---
**Navigation**
{% if page.url contains 'ansible_rhel_90' %}
[Previous Exercise](../2-thebasics) - [Next Exercise](../4-variables)
[Previous Exercise](../1.2-thebasics) - [Next Exercise](../1.4-variables)
{% else %}
[Previous Exercise](../1.2-thebasics) - [Next Exercise](../1.4-variables)
{% endif %}
Expand Down
3 changes: 2 additions & 1 deletion exercises/ansible_rhel/1.4-variables/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Update the `system_setup.yml` playbook to include and use a variable:
user_name: 'Roger'
tasks:
- name: Update all security-related packages
ansible.builtin.dnf:
ansible.builtin.package:
name: '*'
state: latest
security: true
Expand Down Expand Up @@ -157,6 +157,7 @@ node1 : ok=3 changed=1 unreachable=0 failed=0 s
```

Review the output to confirm the user existence check is correctly using the variable and conditional logic.

---
**Navigation**
<br>
Expand Down
Loading

0 comments on commit 9bfedab

Please sign in to comment.