ansible / workshops Goto Github PK
View Code? Open in Web Editor NEWTraining Course for Ansible Automation Platform
License: MIT License
Training Course for Ansible Automation Platform
License: MIT License
I'd recommend adding the domain to the sample-vars* like this:
#workshop_dns_zone: "rhdemo.io"
I didn't have an account that could update rhdemo.io so I created my one Route 53 and then the step that creates the LABNAME.worshop_dns_zone would succeed.
I'll work on a PR that does the above. (This is really just a "crutch" to help people setting up a linklight lab the very first time. But it is intended to be more OVERT and help people see how to do things.)
In the Lab exercise 2.1, step 3, Download the Latest Ansible Tower has us use "curl -O". However, that is not working on the newly built VM (though it is "succeeding" it isn't actually downloading anything.) wget is also available on the system at this time, so I suggest changing that command to wget.
Look for a PR shortly.
Hello guys,
Could you please help me with this issue?
My Domain "redhatbr.io" is working fine, but the error below was presented during the perform of provision_lab.yml playbook.
TASK [aws_workshop_login_page : DNS for student webpage] *************************************************************************************************************************************
task path: /home/lsanches/GIT-REDHAT/linklight/provisioner/roles/aws_workshop_login_page/tasks/main.yml:23
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: lsanches
<127.0.0.1> EXEC /bin/sh -c 'echo ~lsanches && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "echo /home/lsanches/.ansible/tmp/ansible-tmp-1533752478.27-111969520333191
" && echo ansible-tmp-1533752478.27-111969520333191="echo /home/lsanches/.ansible/tmp/ansible-tmp-1533752478.27-111969520333191
" ) && sleep 0'
Using module file /usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/route53.py
<127.0.0.1> PUT /home/lsanches/.ansible/tmp/ansible-local-28668FaGJiK/tmpKVTuCF TO /home/lsanches/.ansible/tmp/ansible-tmp-1533752478.27-111969520333191/route53.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/lsanches/.ansible/tmp/ansible-tmp-1533752478.27-111969520333191/ /home/lsanches/.ansible/tmp/ansible-tmp-1533752478.27-111969520333191/route53.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python2 /home/lsanches/.ansible/tmp/ansible-tmp-1533752478.27-111969520333191/route53.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/lsanches/.ansible/tmp/ansible-tmp-1533752478.27-111969520333191/ > /dev/null 2>&1 && sleep 0'
fatal: [localhost]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"alias": null,
"alias_evaluate_target_health": false,
"alias_hosted_zone_id": null,
"aws_access_key": null,
"aws_secret_key": null,
"ec2_url": null,
"failover": null,
"health_check": null,
"hosted_zone_id": null,
"identifier": null,
"overwrite": true,
"private_zone": false,
"profile": null,
"record": "testdrivebr.redhatbr.io",
"region": null,
"retry_interval": "500",
"security_token": null,
"state": "present",
"ttl": 3600,
"type": "CNAME",
"validate_certs": true,
"value": [
"testdrivebr.redhatbr.io.s3-website-us-east-1.amazonaws.com"
],
"vpc_id": null,
"wait": false,
"wait_timeout": 300,
"weight": null,
"zone": "redhatbr.io"
}
},
"msg": "Zone redhatbr.io. does not exist in Route53"
}
PLAY RECAP ***********************************************************************************************************************************************************************************
TestDriveBR-student1-ansible : ok=24 changed=4 unreachable=0 failed=0
TestDriveBR-student1-host1 : ok=6 changed=0 unreachable=0 failed=0
localhost : ok=62 changed=7 unreachable=0 failed=1
Ran into the following trying to auto provision Tower. I have not dug into debug yet.
...
TASK [control_node : wait for Ansible Tower to be up] ********************************
ok: [TESTWORKSHOP-23-May-student4-ansible]
ok: [TESTWORKSHOP-23-May-student5-ansible]
ok: [TESTWORKSHOP-23-May-student1-ansible]
ok: [TESTWORKSHOP-23-May-student2-ansible]
FAILED - RETRYING: wait for Ansible Tower to be up (10 retries left).
ok: [TESTWORKSHOP-23-May-student3-ansible]
TASK [control_node : Post license key] ***********************************************
fatal: [TESTWORKSHOP-23-May-student3-ansible]: FAILED! => {"allow": "GET, POST, DELETE, HEAD, OPTIONS", "changed": false, "connection": "close", "content": "{\"error\":\"Missing 'eula_accepted' property\"}", "content_language": "en", "content_type": "application/json", "date": "Mon, 21 May 2018 02:24:52 GMT", "json": {"error": "Missing 'eula_accepted' property"}, "msg": "Status code was 400 and not [200]: HTTP Error 400: BAD REQUEST", "redirected": false, "server": "nginx/1.12.2", "status": 400, "transfer_encoding": "chunked", "url": "https://localhost/api/v2/config/", "vary": "Accept, Accept-Language, Cookie", "x_api_node": "localhost", "x_api_time": "0.221s", "x_api_total_time": "0.591s"}
fatal: [TESTWORKSHOP-23-May-student4-ansible]: FAILED! => {"allow": "GET, POST, DELETE, HEAD, OPTIONS", "changed": false, "connection": "close", "content": "{\"error\":\"Missing 'eula_accepted' property\"}", "content_language": "en", "content_type": "application/json", "date": "Mon, 21 May 2018 02:24:53 GMT", "json": {"error": "Missing 'eula_accepted' property"}, "msg": "Status code was 400 and not [200]: HTTP Error 400: BAD REQUEST", "redirected": false, "server": "nginx/1.12.2", "status": 400, "transfer_encoding": "chunked", "url": "https://localhost/api/v2/config/", "vary": "Accept, Accept-Language, Cookie", "x_api_node": "localhost", "x_api_time": "0.072s", "x_api_total_time": "0.079s"}
fatal: [TESTWORKSHOP-23-May-student5-ansible]: FAILED! => {"allow": "GET, POST, DELETE, HEAD, OPTIONS", "changed": false, "connection": "close", "content": "{\"error\":\"Missing 'eula_accepted' property\"}", "content_language": "en", "content_type": "application/json", "date": "Mon, 21 May 2018 02:24:53 GMT", "json": {"error": "Missing 'eula_accepted' property"}, "msg": "Status code was 400 and not [200]: HTTP Error 400: BAD REQUEST", "redirected": false, "server": "nginx/1.12.2", "status": 400, "transfer_encoding": "chunked", "url": "https://localhost/api/v2/config/", "vary": "Accept, Accept-Language, Cookie", "x_api_node": "localhost", "x_api_time": "0.072s", "x_api_total_time": "0.192s"}
fatal: [TESTWORKSHOP-23-May-student2-ansible]: FAILED! => {"allow": "GET, POST, DELETE, HEAD, OPTIONS", "changed": false, "connection": "close", "content": "{\"error\":\"Missing 'eula_accepted' property\"}", "content_language": "en", "content_type": "application/json", "date": "Mon, 21 May 2018 02:24:54 GMT", "json": {"error": "Missing 'eula_accepted' property"}, "msg": "Status code was 400 and not [200]: HTTP Error 400: BAD REQUEST", "redirected": false, "server": "nginx/1.12.2", "status": 400, "transfer_encoding": "chunked", "url": "https://localhost/api/v2/config/", "vary": "Accept, Accept-Language, Cookie", "x_api_node": "localhost", "x_api_time": "0.231s", "x_api_total_time": "0.251s"}
fatal: [TESTWORKSHOP-23-May-student1-ansible]: FAILED! => {"allow": "GET, POST, DELETE, HEAD, OPTIONS", "changed": false, "connection": "close", "content": "{\"error\":\"Missing 'eula_accepted' property\"}", "content_language": "en", "content_type": "application/json", "date": "Mon, 21 May 2018 02:24:54 GMT", "json": {"error": "Missing 'eula_accepted' property"}, "msg": "Status code was 400 and not [200]: HTTP Error 400: BAD REQUEST", "redirected": false, "server": "nginx/1.12.2", "status": 400, "transfer_encoding": "chunked", "url": "https://localhost/api/v2/config/", "vary": "Accept, Accept-Language, Cookie", "x_api_node": "localhost", "x_api_time": "0.298s", "x_api_total_time": "0.338s"}
PLAY RECAP ***************************************************************************
TESTWORKSHOP-23-May-student1-ansible : ok=36 changed=26 unreachable=0 failed=1
TESTWORKSHOP-23-May-student1-host1 : ok=8 changed=4 unreachable=0 failed=0
TESTWORKSHOP-23-May-student2-ansible : ok=36 changed=26 unreachable=0 failed=1
TESTWORKSHOP-23-May-student2-host1 : ok=8 changed=4 unreachable=0 failed=0
TESTWORKSHOP-23-May-student3-ansible : ok=36 changed=26 unreachable=0 failed=1
TESTWORKSHOP-23-May-student3-host1 : ok=8 changed=4 unreachable=0 failed=0
TESTWORKSHOP-23-May-student4-ansible : ok=36 changed=26 unreachable=0 failed=1
TESTWORKSHOP-23-May-student4-host1 : ok=8 changed=4 unreachable=0 failed=0
TESTWORKSHOP-23-May-student5-ansible : ok=36 changed=26 unreachable=0 failed=1
TESTWORKSHOP-23-May-student5-host1 : ok=8 changed=4 unreachable=0 failed=0
localhost : ok=61 changed=30 unreachable=0 failed=0
user@ubuntu:~/linklight/provisioner$
I noticed during a recent class I attended that there are some issues in the way various labs are presented to users. As this is the network-automation/linklight lab, I'd like to see the FIRST set of options presented be the Network lab options. This occurs in at least two places:
during today's session to change the order.
I got to the WRONG labs by starting at this page:
https://network-automation.github.io/linklight/
It shows Ansible Engine Workshop foremost (but this particular repo is not specifically about Engine).
and as Sean C. noticed, the same issue happens on the generated TESTWORKSHOP.rhdemo.io page via the rectangle buttons where Ansible Networking appears as the third button (when read left to right like most of the world does). I'd just move networking to the forefront since by default, this deck is for networking workshops.
On this slide:
https://network-automation.github.io/linklight/decks/ansible-networking.html#/37
The command shown:
ansible -m ios_facts routers
when done on a linklight control node, fails because network_cli
is not set as the connection type.
Update the example to:
ansible -m ios_facts routers -c network_cli
When following the workshop lab 2.2-towerconfigure from https://github.com/network-automation/linklight/tree/master/exercises/networking/2.2-towerconfigure, I noticed that my control node does not have the networking-workshop directory created. I followed instructions from the provisioner to deploy the student instances: https://github.com/network-automation/linklight/tree/master/provisioner.
How can I make sure the directory is created and matches the lab instructions? How can I get the proper inventory generated?
Was running through the network provisioner today, it is broken until 2.6 is released due to usage of aws_caller_facts
.
provided PDF for slides for customers and employees
from our google doc session->
Third playbook
Template - show commands
{{inventory_hostname}} is running version {{ansible-network_os}}
might be good to steal content from this exercise-> https://github.com/network-automation/linklight/blob/master/vagrant-demo/training-course/exercise02/README.md
When having the playbook install Tower, the tower setup task times out.
In the Ansible + Networking exercise 1.2 (https://github.com/network-automation/linklight/tree/master/exercises/networking/1.2-backup) step 4, even though the above sections talk about how the playbook is finding the host file due to the configuration of .ansible.cfg, it might be a good idea to mention again "Hey, a lot of times playbooks get executed in the same directory where hosts file lives but because we specified the .ansible.cfg file above, this playbook will find the hosts anywhere" or something like that.
Exercise 1.6
- very confusing on the wording of where you are supposed to be after everything else being done in the “networking_workshop” folder, confused people with the “test” folder structure. Perhaps reword or make it more clear the change in the directory.
ansible 2.5.0
Tested with eb1a01f and both Ansible 2.6 and 2.7.
Task Kill BIG-IP CFT (F5 MODE)
tries to remove (non-exsistant) CloudForms template?
Steps to reproduce:
ansible-playbook teardown_lab.yml -e @delete_vars.yml
Where delete_vars.yml contains
f5workshop: true
Fix: remove/amend task Kill BIG-IP CFT (F5 MODE) from roles/manage_ec2_instances/tasks/teardown.yml:-
TASK [manage_ec2_instances : Kill BIG-IP CFT (F5 MODE)] ***************************************************************************************************************
failed: [localhost] (item=1) => {"changed": false, "item": 1, "module_stderr": "/Library/Python/2.7/site-packages/botocore/vendored/requests/packages/urllib3/connectio
npool.py:768: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org
/en/latest/security.html\n InsecureRequestWarning)\nTraceback (most recent call last):\n File \"/Users/tok/.ansible/tmp/ansible-tmp-1538676939.91-119478950312692/Ans
iballZ_cloudformation.py\", line 113, in <module>\n _ansiballz_main()\n File \"/Users/tok/.ansible/tmp/ansible-tmp-1538676939.91-119478950312692/AnsiballZ_cloudfo$
mation.py\", line 105, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/Users/tok/.ansible/tmp/ansible-tmp-1538676939.91-11947
8950312692/AnsiballZ_cloudformation.py\", line 48, in invoke_module\n imp.load_module('__main__', mod, module, MOD_DESC)\n File \"/var/folders/d9/0tskx9zn1b79ytlf1
4xbv6wc0000gn/T/ansible_cloudformation_payload_GluwOJ/__main__.py\", line 734, in <module>\n File \"/var/folders/d9/0tskx9zn1b79ytlf14xbv6wc0000gn/T/ansible_cloudform
ation_payload_GluwOJ/__main__.py\", line 663, in main\n File \"/var/folders/d9/0tskx9zn1b79ytlf14xbv6wc0000gn/T/ansible_cloudformation_payload_GluwOJ/__main__.py\", l
ine 550, in get_stack_facts\nbotocore.exceptions.ClientError: An error occurred (ValidationError) when calling the DescribeStacks operation: 1 validation error detecte
d: Value '107a-student1-f5' at 'stackName' failed to satisfy constraint: Member must satisfy regular expression pattern: [a-zA-Z][-a-zA-Z0-9]*|arn:[-a-zA-Z0-9:/._+]*\n
", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
under exercises/networking_v2 we need to create an exercise for backing up networking configs (similar to exercise 1.2 for the 2rtr networking workshop).
Ideally the final playbook would be agnostic, meaning if we spun up 4x Cisco CSR OR 2x Cisco CSR & 2 x Juniper vMX we would get identical results
Yesterday I ran into an issue where I had to rerun the provisioner with an updated student count. This caused 2 control nodes to be created for previously created student pods. The routers were still idempotent.
@willtome - Update Lab 1.2 with Network CLI
We need to use "ansible_net_version".
exercises/networking/1.5-roles/README.md
exercises/networking/1.5-roles/roles/static_route/tasks/main.yml
exercises/networking/1.5-roles/roles/interface/tasks/main.yml
https://network-automation.github.io/linklight/decks/ansible_network_v2.html#/5
the x-axis is wrong
It makes playbooks error.
exercises/networking/1.5-roles/README.md
exercises/networking/1.5-roles/README.ja.md
exercises/networking/1.5-roles/group_vars/all.yml
using latest 2.7 devel:
ASK [common : hostname] ********************************************************************************************************************************************************************************************************************
fatal: [rdu-student39-node1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'short_name' is undefined\n\nThe error appears to have been in '/root/creynold/linklight/provisioner/roles/common/tasks/main.yml': line 16, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- hostname:\n ^ here\n"}
fatal: [rdu-student48-node1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'short_name' is undefined\n\nThe error appears to have been in '/root/creynold/linklight/provisioner/roles/common/tasks/main.yml': line 16, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- hostname:\n ^ here\n"}
fatal: [rdu-student25-node1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'short_name' is undefined\n\nThe error appears to have been in '/root/creynold/linklight/provisioner/roles/common/tasks/main.yml': line 16, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- hostname:\n ^ here\n"}
fatal: [rdu-student15-node1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'short_name' is undefined\n\nThe error appears to have been in '/root/creynold/linklight/provisioner/roles/common/tasks/main.yml': line 16, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- hostname:\n ^ here\n"}
fatal: [rdu-student4-node1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'short_name' is undefined\n\nThe error appears to have been in '/root/creynold/linklight/provisioner/roles/common/tasks/main.yml': line 16, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- hostname:\n ^ here\n"}
fatal: [rdu-student3-node1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'short_name' is undefined\n\nThe error appears to have been in '/root/creynold/linklight/provisioner/roles/common/tasks/main.yml': line 16, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- hostname:\n ^ here\n"}
fatal: [rdu-student45-node1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'short_name' is undefined\n\nThe error appears to have been in '/root/creynold/linklight/provisioner/roles/common/tasks/main.yml': line 16, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- hostname:\n ^ here\n"}
fatal: [rdu-student8-node1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'short_name' is undefined\n\nThe error appears to have been in '/root/creynold/linklight/provisioner/roles/common/tasks/main.yml': line 16, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- hostname:\n ^ here\n"}
Provisioner is erroring with an unknown parameter. botocore version I am running is 1.10.
(mypips) [medberry@thestrel provisioner]$ python
Python 2.7.14 (default, Mar 14 2018, 13:36:31)
[GCC 7.3.1 20180303 (Red Hat 7.3.1-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import botocore
print botocore.version
1.10.42
ah, but it looks like the provisioner is NOT always running inside of my virtualenv and is dropping down to the shell (which only has 1.6.0 not 1.10.42). Sheesh, why is it calling straight to the shell?
The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_fbiOxX/ansible_module_ec2_vpc_subnet.py", line 266, in handle_waiter
**waiter_params(module, params, start_time)
File "/usr/lib/python2.7/site-packages/botocore/waiter.py", line 295, in wait
response = self._operation_method(**kwargs)
File "/usr/lib/python2.7/site-packages/botocore/waiter.py", line 84, in call
return self._client_method(**kwargs)
File "/usr/lib/python2.7/site-packages/botocore/client.py", line 312, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/usr/lib/python2.7/site-packages/botocore/client.py", line 575, in _make_api_call
api_params, operation_model, context=request_context)
File "/usr/lib/python2.7/site-packages/botocore/client.py", line 630, in _convert_to_request_dict
api_params, operation_model)
File "/usr/lib/python2.7/site-packages/botocore/validate.py", line 291, in serialize_to_request
raise ParamValidationError(report=report.generate_report())
ParamValidationError: Parameter validation failed:
Unknown parameter in input: "WaiterConfig", must be one of: Filters, SubnetIds, DryRun
In the Networking Training exercise 1.6, Roles (https://github.com/network-automation/linklight/tree/master/exercises/networking/1.5-roles), under section 7, the text:
For roles/interfaces/tasks/static_route:
...should read:
For roles/static_route/tasks/main.yml:
we need a new diagram for the 4xrtr design for AWS. We would like to have it look as clean as this-> https://github.com/network-automation/linklight/raw/master/images/diagram.png
there will 2 x rtr in 1 VPC and 2 x rtr in 2nd VPC
It makes us confuse.
exercises/networking/1.4-router_configs/README.ja.md
exercises/networking/1.5-roles/README.ja.md
On March 1, 2018, we are updating our naming conventions for S3 buckets in the US East (N. Virginia) Region to match the naming conventions we use in all other worldwide AWS Regions. After this date, Amazon S3 will no longer support creating bucket names that contain uppercase letters or underscores.
https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html
We don't use the copyied file in the steps.
~/networking_workshop/test
is not exist.
We can delete this step.
When provisioning F5 workshop it occasionally throws the follow error.
FAILED! => {"changed": false, "msg": "tmsh -v\r\nSyntax Error: unexpected argument \"tmsh\"\r\nadmin@(ip-172-16-150-172)(cfg-sync Standalone)(Active)(/Common)(tmos)# "}
Adding this for awareness.
The current published exercise:
https://network-automation.github.io/linklight/exercises/networking/1.1-adhoc/
Is missing the initial inventory setup.
In this lab https://network-automation.github.io/linklight/exercises/networking/2.3-towerjob/ the path to the playbook to select is not available.
Exercise 1.6
Step 1
- if following the “test” folder structure there is no router_configs.yml since its in the "networking-workshop” folder. Need to add a step to change into the networking_workshop folder or add the router_configs.yml earlier in the workshop.
seems like certain people's systems get some odd version of jinja2 or are missing it and then the playbook will fail with odd failures... easy to just check and fail right at the beginning if jinja is missing rather than relying on a module to error
Make a note in the docs/faq.md that boto3 has an issue with URIs manufactured from environment variables and to reiterate the best practices of using ~/.aws/credentials.
On some slides, such as, here there is meant to be a highlighted section (name: install and start apache
).
It appears that the highlight.js code has been disabled:
//{ src: 'https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.4.1/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }
When enabling it breaks the code blocks. Suspecting there is a conflict between the highlighting and the yaml syntax scripts.
This isn't clearly documented and throws an error during the first attempt at running the playbook
TASK [manage_ec2_instances : Create EC2 instances for rtr1 node (NETWORKING MODE)] ************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Instance creation failed => OptInRequired: In order to use this AWS Marketplace product you need to accept terms and subscribe. To do so please visit https://aws.amazon.com/marketplace/pp?sku=5tiyrfb5tasxk9gmnab39b843"}
Current Marketplace URL
This should be noted in the documentation or in the FAQ
Addition of ansible_python_interpreter in the hosts file break the lightbulb side. commenting out it works fine. need to add logic
commit: f5771fd #
under exercises/networking_v2 we need to create an exercise for backing up networking configs (similar to exercise 1.1 for the 2rtr networking workshop). We have decided NOT to do ad-hoc so this would be a in a playbook format
Ideally the final playbook would be agnostic, meaning if we spun up 4x Cisco CSR OR 2x Cisco CSR & 2 x Juniper vMX we would get identical results
In roles/control_node/tasks/main.yml, the following task downloads a hardcoded version of Ansible:
- name: Download Ansible
get_url:
url: http://releases.ansible.com/ansible/rpm/release/epel-7-x86_64/ansible-2.5.0-1.el7.ans.noarch.rpm
dest: /tmp/ansible.rpm
Bugs like ansible/ansible#40064 have been resolved in newer versions of Ansible.
To enable the user to demo linklight using the appropriately patched version of Ansible, it will be great if the rpm file above is made into a variable and a sane default is set in the role's default/main.yml. Perhaps: ansible-2.5.5-1.el7.ans.noarch.rpm
When tearing down the workshops the Route53 DNS entry remains.
fix the 172-16-14-3 hostnames to the new short hostnames
in the provisioner/roles/control_node/networking.yml
there is a task->
- name: Move networking workshop folder to correct location (NETWORKING MODE)
command: cp -r /tmp/linklight/exercises/networking/ /home/{{ username }}/networking-workshop
I would love suggestions on how to make this identical... but idempotent
There are some old sentences in README.ja.mds
TASK [control_node : Put student inventory in proper spot (NETWORKING MODE)] *****************************************************************************************************************
task path: /home/lsanches/GIT-REDHAT/linklight/provisioner/roles/control_node/tasks/networking.yml:55
<204.236.245.220> ESTABLISH SSH CONNECTION FOR USER: ec2-user
<204.236.245.220> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=22 -o 'IdentityFile="/home/lsanches/GIT-REDHAT/linklight/provisioner/TESTESA/TESTESA-private.pem"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ec2-user -o ConnectTimeout=10 -o ControlPath=/home/lsanches/.ansible/cp/5c5e409aba 204.236.245.220 '/bin/sh -c '"'"'echo ~ec2-user && sleep 0'"'"''
<204.236.245.220> (0, '/home/ec2-user\n', '')
<204.236.245.220> ESTABLISH SSH CONNECTION FOR USER: ec2-user
<204.236.245.220> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=22 -o 'IdentityFile="/home/lsanches/GIT-REDHAT/linklight/provisioner/TESTESA/TESTESA-private.pem"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ec2-user -o ConnectTimeout=10 -o ControlPath=/home/lsanches/.ansible/cp/5c5e409aba 204.236.245.220 '/bin/sh -c '"'"'( umask 77 && mkdir -p "echo /home/ec2-user/.ansible/tmp/ansible-tmp-1533682547.86-267810028279150
" && echo ansible-tmp-1533682547.86-267810028279150="echo /home/ec2-user/.ansible/tmp/ansible-tmp-1533682547.86-267810028279150
" ) && sleep 0'"'"''
<204.236.245.220> (0, 'ansible-tmp-1533682547.86-267810028279150=/home/ec2-user/.ansible/tmp/ansible-tmp-1533682547.86-267810028279150\n', '')
The full traceback is:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/ansible/plugins/action/copy.py", line 442, in run
source = self._find_needle('files', source)
File "/usr/lib/python2.7/site-packages/ansible/plugins/action/init.py", line 1057, in _find_needle
return self._loader.path_dwim_relative_stack(path_stack, dirname, needle)
File "/usr/lib/python2.7/site-packages/ansible/parsing/dataloader.py", line 322, in path_dwim_relative_stack
raise AnsibleFileNotFound(file_name=source, paths=[to_text(p) for p in search])
AnsibleFileNotFound: Could not find or access '/home/lsanches/GIT-REDHAT/linklight/provisioner/TESTESA/student1-instances.txt' on the Ansible Controller.
If you are using a module and expect the file to exist on the remote, see the remote_src option
fatal: [TESTESA-student1-ansible]: FAILED! => {
"changed": false,
"msg": "Could not find or access '/home/lsanches/GIT-REDHAT/linklight/provisioner/TESTESA/student1-instances.txt' on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option"
}
PLAY RECAP ***********************************************************************************************************************************************************************************
TESTESA-student1-ansible : ok=18 changed=13 unreachable=0 failed=1
TESTESA-student1-host1 : ok=7 changed=5 unreachable=0 failed=0
localhost : ok=61 changed=25 unreachable=0 failed=0
Hello guys. As you described within README, I'm using Ansible 2.5 for provisioning environments, but recently I see that provision_lab.yml was updated:
- name: make sure we are running correct Ansible Version
assert:
that:
- ansible_version.minor >= 6
- ansible_version.major >= 2
It' seems that Ansible 2.6 is necessary for aws_caller_facts, but in my understanding it's in development stage right now, isn't it?
ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.
Because I'm having an error using Ansible 2.5. Could you help me with that?
Thanks in advance!
under exercises/networking_v2 we need to create an exercise for creating the GRE tunnel between the two AWS VPCs. It is not clear to me if @termlen0 and @gdykeman want to combine this with OSPF or just improve on what we have now. We need to probably designate which rtr per VPC will be the tunnel broker.
Ideally the final playbook would be agnostic, meaning if we spun up 4x Cisco CSR OR 2x Cisco CSR & 2 x Juniper vMX we would get identical results
If I try to use the provisioner with this option commented out:
ec2_key_name:
The provisioner pauses while trying to trust the newly created ssh key
If I use an existing key, such as one I've imported into AWS, the teardown destroys that key. Assuming I have an existing key, I probably don't want that key removed from AWS during teardown, right?
the exercise here: https://github.com/network-automation/linklight/tree/master/exercises/networking_v2/labs/lab03-templating/exercise02-parser
has output that doesn't match the results of the playbook
should look like this->
[student35@ansible networking_v2]$ ansible-playbook test.yml
PLAY [GENERATE INTERFACE REPORT] *******************************************************************************
TASK [CAPTURE SHOW INTERFACES] *********************************************************************************
ok: [rtr3]
ok: [rtr4]
ok: [rtr2]
ok: [rtr1]
TASK [PARSE THE RAW OUTPUT] ************************************************************************************
ok: [rtr2]
ok: [rtr3]
ok: [rtr4]
ok: [rtr1]
TASK [GENERATE REPORT FRAGMENTS] *******************************************************************************
ok: [rtr2]
ok: [rtr4]
ok: [rtr1]
ok: [rtr3]
TASK [GENERATE A CONSOLIDATED REPORT] **************************************************************************
ok: [rtr1 -> localhost]
PLAY RECAP *****************************************************************************************************
rtr1 : ok=4 changed=0 unreachable=0 failed=0
rtr2 : ok=3 changed=0 unreachable=0 failed=0
rtr3 : ok=3 changed=0 unreachable=0 failed=0
rtr4 : ok=3 changed=0 unreachable=0 failed=0
this is not quite right either, we need to show the "first time" where it will show "changed" so students will have output that matches what they are seeing on their terminal window
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.