forked from ansible/workshops
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
528 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,18 +4,20 @@ | |
|
||
## Índice | ||
|
||
* [Objetivo](#objetivo) | ||
* [Diagrama](#diagrama) | ||
* [Guía](#guía) | ||
* [Paso 1 - Connectar vía VS Code](#paso-1---connectar-vía-vs-code) | ||
* [Paso 2 - Usando la Terminal](#paso-2---usando-la-terminal) | ||
* [Paso 3 - Examinando los Entornos de Ejecución](#paso-3---examinando-los-entornos-de-ejecución) | ||
* [Paso 4 - Examinando la configuración de ansible-navigator](#paso-4---examinando-la-configuración-de-ansible-navigator) | ||
* [Paso 5 - Examinando el inventario](#paso-5---examinando-el-inventario) | ||
* [Paso 6 - Comprendiendo el inventario](#paso-6---comprendiendo-el-inventario) | ||
* [Paso 7 - Usando ansible-navigator para explorar el inventario](#paso-7---usando-ansible-navigator-para-explorar-el-inventario) | ||
* [Paso 8 - Connectándose a dispositivos de red](#paso-8---connectándose-a-dispositivos-de-red) | ||
* [Completado](#complete) | ||
- [Ejercicio 1 - Explorando el entorno de laboratorio](#ejercicio-1---explorando-el-entorno-de-laboratorio) | ||
- [Índice](#índice) | ||
- [Objetivo](#objetivo) | ||
- [Diagrama](#diagrama) | ||
- [Guía](#guía) | ||
- [Paso 1 - Connectar vía VS Code](#paso-1---connectar-vía-vs-code) | ||
- [Paso 2 - Usando la Terminal](#paso-2---usando-la-terminal) | ||
- [Paso 3 - Examinando los Entornos de Ejecución](#paso-3---examinando-los-entornos-de-ejecución) | ||
- [Paso 4 - Examinando la configuración de ansible-navigator](#paso-4---examinando-la-configuración-de-ansible-navigator) | ||
- [Paso 5 - Examinando el inventario](#paso-5---examinando-el-inventario) | ||
- [Paso 6 - Comprendiendo el inventario](#paso-6---comprendiendo-el-inventario) | ||
- [Paso 7 - Usando ansible-navigator para explorar el inventario](#paso-7---usando-ansible-navigator-para-explorar-el-inventario) | ||
- [Paso 8 - Connectándose a dispositivos de red](#paso-8---connectándose-a-dispositivos-de-red) | ||
- [Completado](#completado) | ||
|
||
## Objetivo | ||
|
||
|
@@ -31,10 +33,9 @@ Esto incluye: | |
|
||
Si necesitaás más informacion sobre los nuevos componentes de Ansible Automation Platform, añáde esta página [https://red.ht/AAP-20](https://red.ht/AAP-20) a tus marcadores. | ||
|
||
> Chatea con nosotros | ||
> Join our community forum! | ||
> | ||
> Antes de comenzar, por favor, únete a nosotros en slack <a href="https://join.slack.com/t/ansiblenetwork/shared_invite/zt-3zeqmhhx-zuID9uJqbbpZ2KdVeTwvzw">Haz click aquí para unirte al canal de slack ansiblenetwork</a>. Esto te permitirá chatear con otros ingeniero de automatización de redes y obtener ayuda una vez concluídos los talleres. Si el enlace no funcionase, por favor envíanos un email a <a href="mailto:[email protected]">Ansible Technical Marketing</a></th> | ||
> Before you get started, please join us on <a target="_new" href="https://forum.ansible.com/">https://forum.ansible.com/</a>. This will allow you to get Ansible help after the workshops concludes. | ||
## Diagrama | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,9 +32,9 @@ These first few lab exercises will be exploring the command-line utilities of th | |
|
||
If you need more information on new Ansible Automation Platform components bookmark this landing page [https://red.ht/AAP-20](https://red.ht/AAP-20) | ||
|
||
> Chat with us | ||
> Join our community forum! | ||
> | ||
> Before you get started, please join us on slack! <a href="https://join.slack.com/t/ansiblenetwork/shared_invite/zt-3zeqmhhx-zuID9uJqbbpZ2KdVeTwvzw">Click here to join the ansiblenetwork slack</a>. This will allow you to chat with other network automation engineers and get help after the workshops concludes. If the link goes stale please email <a href="mailto:[email protected]">Ansible Technical Marketing</a></th> | ||
> Before you get started, please join us on <a target="_new" href="https://forum.ansible.com/">https://forum.ansible.com/</a>. This will allow you to get Ansible help after the workshops concludes. | ||
|
||
## Diagram | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Code Server Role | ||
|
||
This roll will install [code server](https://github.com/cdr/code-server) onto a Red Hat Enterprise Linux (RHEL) node that also has Ansible Automation Platform installed (i.e. Tower/Controller). It supports both Ansible Tower and Automation controller. | ||
|
||
This is tested on RHEL 8.X | ||
|
||
Example: | ||
|
||
``` | ||
- name: configure ansible control node | ||
hosts: 'controller_hosts' | ||
gather_facts: true | ||
become: true | ||
vars: | ||
workshop_dns_zone: "demoredhat.com" | ||
admin_password: ansible123 | ||
username: "student1" | ||
ec2_name_prefix: "my_workbench" | ||
tasks: | ||
- include_role: | ||
name: ansible.workshops.code_server | ||
``` | ||
|
||
# Requirements | ||
|
||
- AWS (Amazon Web Services) account with Route53 access - this role is only currently supported with route53 and uses the `community.aws.route53` module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
s3_state: "present" | ||
teardown: false | ||
aap_dir: "/home/{{ username }}/aap_install" | ||
codeserver_url: https://github.com/coder/code-server/releases/download/v4.9.1/code-server-4.9.1-amd64.rpm | ||
codeserver_rescue_url: https://github.com/coder/code-server/releases/download/v4.9.1/code-server-4.9.1-amd64.rpm | ||
username: "ec2-user" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
--- | ||
argument_specs: | ||
main: | ||
short_description: Set up the code server, main entrypoint. | ||
options: | ||
teardown: | ||
description: Whether to execute teardown or creation. | ||
type: bool | ||
required: true | ||
username: | ||
description: The workshop username. | ||
type: str | ||
required: true | ||
ec2_name_prefix: | ||
description: A prefix for EC2 and DNS resources. | ||
type: str | ||
required: true | ||
workshop_dns_zone: | ||
description: The base DNS zone for the workshop. | ||
type: str | ||
required: true | ||
codeserver: | ||
short_description: Provision the code server. | ||
options: | ||
s3_state: | ||
description: Whether the DNS record is present or absent. | ||
type: str | ||
options: | ||
- present | ||
- absent | ||
required: true | ||
workshop_dns_zone: | ||
description: The base DNS zone for the workshop. | ||
type: str | ||
required: true | ||
username: | ||
description: The workshop username. | ||
type: str | ||
required: true | ||
ec2_name_prefix: | ||
description: A prefix for EC2 and DNS resources. | ||
type: str | ||
required: true | ||
admin_password: | ||
description: The code server admin password. | ||
type: str | ||
required: true | ||
teardown: | ||
short_description: Teardown the code server. | ||
options: | ||
s3_state: | ||
description: Whether the DNS record is present or absent. | ||
type: str | ||
options: | ||
- present | ||
- absent | ||
required: true | ||
workshop_dns_zone: | ||
description: The base DNS zone for the workshop. | ||
type: str | ||
required: true | ||
ec2_name_prefix: | ||
description: A prefix for EC2 and DNS resources. | ||
type: str | ||
required: true | ||
student_total: | ||
description: The total number of students for the workshop. | ||
type: int | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
- name: Pull code-server image | ||
containers.podman.podman_image: | ||
name: "{{ item }}" | ||
register: podman_pull | ||
until: podman_pull is not failed | ||
retries: 5 | ||
delay: 15 | ||
|
||
# source: https://vscode.readthedocs.io/en/latest/getstarted/settings/ | ||
# - name: ensure custom facts directory exists | ||
# ansible.builtin.file: | ||
# path: "/home/{{ username }}/.local/share/code-server/User/" | ||
# recurse: true | ||
# state: directory | ||
# owner: "{{ username }}" | ||
|
||
# - name: Apply code server defaults | ||
# ansible.builtin.template: | ||
# src: settings.json | ||
# dest: "/home/{{ username }}/.local/share/code-server/User/settings.json" | ||
# owner: "{{ username }}" | ||
|
||
# - name: Create a directory if it does not exist | ||
# ansible.builtin.file: | ||
# path: /home/{{ username }}/.local/share/code-server/extensions/ | ||
# state: directory | ||
# owner: "{{ username }}" | ||
# group: "{{ username }}" | ||
|
||
# - name: Download files for vscode | ||
# ansible.builtin.get_url: | ||
# url: "{{ item }}" | ||
# dest: /home/{{ username }}/.local/share/code-server/extensions/ | ||
# owner: "{{ username }}" | ||
# group: "{{ username }}" | ||
# loop: | ||
# - https://github.com/ansible/workshops/raw/devel/files/bierner.markdown-preview-github-styles-0.1.6.vsix | ||
# - https://github.com/ansible/workshops/raw/devel/files/hnw.vscode-auto-open-markdown-preview-0.0.4.vsix | ||
# - https://github.com/ansible/workshops/raw/devel/files/redhat.ansible-0.4.5.vsix | ||
# register: download_extension | ||
# until: download_extension is not failed | ||
# retries: 5 | ||
|
||
# - name: install ansible and markdown extensions | ||
# become_user: "{{ username }}" | ||
# ansible.builtin.command: "/bin/code-server --install-extension /home/{{ username }}/.local/share/code-server/extensions/{{ item }}" | ||
# loop: | ||
# - bierner.markdown-preview-github-styles-0.1.6.vsix | ||
# - hnw.vscode-auto-open-markdown-preview-0.0.4.vsix | ||
# - redhat.ansible-0.4.5.vsix | ||
# ignore_errors: true | ||
# register: install_extension | ||
# until: install_extension is not failed | ||
# retries: 5 | ||
|
Oops, something went wrong.