glenjarvis / ansible-hands-on Goto Github PK
View Code? Open in Web Editor NEWLearn by doing. A step-by-step set of training exercises that take you from the basics to a fully built web application server
License: MIT License
Learn by doing. A step-by-step set of training exercises that take you from the basics to a fully built web application server
License: MIT License
This template has a typo (as seen below) anythig
The poetry and dependencies are very out of date for this project. As it is written now, the dependency resolution runs for hours before interrupted.
Do a fresh pyproject.toml
and freshly add the dependencies so we can get a modern and, unfortunately, more narrow window of dependencies.
Travis has temporarily been disabled. It still runs, but the tests are not effectively being run.
Re-enable tests that run all of the example playbooks against all Python versions.
This PR disabled:
Update .travis.yml so that Travis notifications can be sent to Slack.
Details:
git log -n 1
: Not Applicableansible --version
: Not ApplicableOutput of python --version
: Not ApplicableText to be rendered in GitHub for README.rst
and CONTRIBUTING.rst
When reading recent changes to the README.rst
and CONTRIBUTING.rst
files, I found several places where there were small typos, links not being rendered properly, etc. These files passed rstcheck
but still had semantic issues in the markup. This was found and fixed already, and I'm putting a ticket in to track the fixes being made.
Details:
git log -n 1
:ansible --version
:Output of python --version
:Copy and paste the output of what you are experiencing here.
Standardize this repository by applying the cookiecutter template https://github.com/glenjarvis/cookiecutter-pypackage.
ReadThe Docs removed. Explore where to host docs since these are training materials:
It is possible that this will not be re-implemented. We want to generate
some docs and PDFs for the Hands On Training course. However, this may
or may not be hosted at ReadTheDocs.
Most of these exercises have gotten bit-rot and haven't been updated since 2017.
Ansible 2.10 now separates ansible-base from the ansible roles and content.
Each of these exercises need to be updated, tested and working again:
Details:
git log -n 1
: eaab36a291d4a40009f181f4e76c1202a12671c1
ansible --version
: Not ApplicableOutput of python --version
: Not ApplicablePip install of development requirements would be successful.
File requirements_dev.txt
is named incorrectly and doesn't exist.
(venv)$ pip install -r requirements_dev.txt
bash: [snip]/ansible_tutorial/venv/bin/pip:
[snip]/ansible_tutorial/venv/bin/python: bad interpreter: No such file or directory
Hi Glen,
So I was able to execute almost all of your examples on my OpenStack VM after removing a bunch of references to ec2-user
.
See #52 for the changes that I made to make most of it work.
However, I'm having trouble with the roles examples I think because they create a webuser
user but it doesn't have an entry in /home/webuser/.ssh/authorized_keys
:
[root@marca-centos webuser]# id webuser
uid=1000(webuser) gid=1000(webuser) groups=1000(webuser)
[root@marca-centos webuser]# ls -al /home/webuser/.ssh
total 8
drwx------ 2 webuser webuser 4096 Jun 26 21:58 .
drwx------ 3 webuser webuser 4096 Jun 26 21:58 ..
so Ansible cannot ssh in as webuser
-- example:
$ ( cd src/roles_examples; ansible-playbook -vvvv demo_play_role_03.yml )
...
TASK: [python_stack | Extract virtualenv source code] *************************
<10.128.4.52> ESTABLISH CONNECTION FOR USER: webuser
<10.128.4.52> REMOTE_MODULE command cd /home/webuser; tar -xvf virtualenv-1.11.tar.gz #USE_SHELL
<10.128.4.52> EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/Users/marca/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'IdentityFile=/Users/marca/.ssh/devops.pem', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', u'User=webuser', '-o', 'ConnectTimeout=10', '10.128.4.52', "/bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1403820914.61-21066504386534 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1403820914.61-21066504386534 && echo $HOME/.ansible/tmp/ansible-tmp-1403820914.61-21066504386534'"]
fatal: [10.128.4.52] => SSH encountered an unknown error. The output was:
OpenSSH_6.6, OpenSSL 1.0.1g 7 Apr 2014
...
debug1: Trying private key: /Users/marca/.ssh/devops.pem
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type RSA
debug3: sign_and_send_pubkey: RSA ee:c6:36:f7:0d:1b:80:ed:09:f1:fe:f0:3e:71:c2:6f
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
to retry, use: --limit @/Users/marca/demo_play_role_03.retry
10.128.4.52 : ok=4 changed=0 unreachable=1 failed=0
When this example repository was written, it worked with the version of Ansible that was current. However, due to bitrot, this is no longer functioning.
On 18-May, 2018, I've done a review of the repository and updated some testing framework. We need to update this repository and update video content to reflect it.
Repository was renamed. PyUp not seeing renamed repo. Temporarily removed shields.
These need re-enabled:
Details:
We had a user get confused with the configuration script. We asked for the default user, but they were confused what user to use.
We use 'ec2-user' as the default user in the ./configure.py script.
However, it was not obvious to this user that he needed to just press ENTER at this command prompt to choose the 'ec2-user' option.
Do not try to anticipate every move of the user. Do not add any more error-checking to the system. The only solution to this problem will be in the print statements in the code.
Please either modify the print statements in the ./configure.py script so that the user knows to actually press "ENTER" to choose the defaults. It's obvious to those of us know how the convention. But, adding an extra sentence to the user may be helpful.
The communication from this user is at this link. He was confused in the configuration and he did not know how to proceed. Make the text on the screen more clear so that he better understands how to proceed:
https://plus.google.com/u/0/events/ccn9oqgqgpg7s7akp11lh2apr9s
Sometimes people are typing the directory to the pem file but not including the pem file. Often people in the Ruby community are more precise in that path means the directory and not the fully qualified path (including the file name) of the file.
Unfortunately, this also means that it takes away execute permission from the current directory (where most people put the file) which adds a great deal of confusion. The entire repo seems messed up to them and there's no easy way out without manual intervention.
Change the wording (sticking to good string formatting) so that it's clear we're talking about the path to (including the filename) of the .pem file. This can be printed on several lines if it makes sense to do so.
Exercises are going to come and go frequently. Trying to keep these numbered is going to be too difficult. We will need to add/remove exercises over time and we don't want to break the links for previous exercises.
./exercises
)README.rst
is created on the ./exercises
level that gives the structure (Introduction, Advanced, etc.)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.