GithubHelp home page GithubHelp logo

redhatnordicssa / ansible-roadshow Goto Github PK

View Code? Open in Web Editor NEW
86.0 86.0 101.0 72.84 MB

One day hands on lab with Ansible and Ansible Tower

License: GNU General Public License v3.0

Shell 26.73% Python 72.65% Jinja 0.62%

ansible-roadshow's People

Contributors

0xs avatar appyoo avatar charn avatar cybette avatar didr avatar drug5 avatar fsoderblom avatar gudvardur avatar idarlund avatar ikke-t avatar jacobborella avatar jannepik avatar juppe avatar mattikbk avatar mglantz avatar mrmeee avatar namob avatar numas avatar pasmon avatar pgustafs avatar rurikon avatar sigurdurdahl avatar tctovsli avatar teemu-u avatar terop avatar tfriman avatar thmarth avatar tobiasbp avatar tobiasehlert avatar tomuxi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ansible-roadshow's Issues

lab3, play recap does not display IP as stated in the labs

PLAY RECAP ************************************************************************************************************************************************************************
client_system_2 : ok=8 changed=5 unreachable=0 failed=0
client_system_3 : ok=8 changed=0 unreachable=0 failed=0

add all playbooks needed into provision-all.yml

There is the provision-all playbook that should do it all in one playbook run. I added instance creation and gitlab install while I tried gitlab part. Make sure all parts are included. Still missing at least:

  1. tower install
  2. lab machines configs
  3. gitlab add users and import project.

Lab3, student user not allowed to do sudo on managed nodes

$ ansible-playbook -i hosts site.yml

PLAY [wildflyservers] *************************************************************************************************************************************************************

TASK [Gathering Facts] ************************************************************************************************************************************************************
fatal: [client_system_3]: FAILED! => {"changed": false, "module_stderr": "Shared connection to 34.242.233.117 closed.\r\n", "module_stdout": "sudo: a password is required\r\n", "msg": "MODULE FAILURE", "rc": 1}
fatal: [client_system_2]: FAILED! => {"changed": false, "module_stderr": "Shared connection to 34.246.180.58 closed.\r\n", "module_stdout": "sudo: a password is required\r\n", "msg": "MODULE FAILURE", "rc": 1}
to retry, use: --limit @/home/student/work/site.retry

PLAY RECAP ************************************************************************************************************************************************************************
client_system_2 : ok=0 changed=0 unreachable=0 failed=1
client_system_3 : ok=0 changed=0 unreachable=0 failed=1

Shouldn't use root user

LAB1:
ansible -i hosts -u root all -m ping

Should be changed to:

ansible -i hosts -u student all -m ping

When lab 8 is done, lab 7 will not work

This is because lab 8 introduces roles, which has secrets in the inventory. Either we should create new inventory for lab 8, or add secret to the ping template. Discuss which is preferred. We need a compromise to keep description short.

Lab1, ansible -i hosts all -m ping

[student@ip-172-31-29-72 work]$ ansible -i hosts all -m ping
client_system_3 | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).\r\n",
"unreachable": true
}
client_system_1 | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).\r\n",
"unreachable": true
}
client_system_2 | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).\r\n",
"unreachable": true
}

Inconsistency in naming.

Lab 1
Instruction in lab 1 refer to ‘you got three servers assigned to you’. The email you receive when joining says refer to 'Client Systems'. Make sure those two things are aligned.

Lab3

"Finally you need to apply the newly created role to your wildflyservers group. In dir $WORK_DIR create a file named site.yml. Put the following content into the file:"

Please introduce the concept of "role".

Lab 0: inconsistency in naming

Lab 0 refer to control server, but this isn't refered to in the diagram. Furthermore control server is not a term in Asnible. Use Tower server instead.

lab-09: needs more handson

Lab doesn't really contain any work..

Some playbooks with faults (wrong indentation, typos, others) should be created...

Lab 1 : Ansible version

The versions are not aligned.

In instructions :

$ansible --version
ansible 2.4.2.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /bin/ansible
python version = 2.7.5 (default, May 3 2017, 07:55:04) [GCC 4.8.5 20150623 (Red Hat 4.8.5-14)]

Command line gives the following :

$ansible --version
ansible 2.6.3
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/student/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.5 (default, May 31 2018, 09:41:32) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]

Lab 1 :

Please specify that the user should ssh with user : student.

"Ensure that you are logged in to your Ansible control server."

ssh-key should be generated on fly, not to use public one

This is "looks bad security habbit" -kinda issue, but it hurts me see we share private ssh key in github. We should generate the key for the first user, and keep inserting the key everywhere by ansible.

E.g: Run ssh-keygen on the tower machine, register and print it to local file. Then push it to all the machines for student users.

client systems unreachable, permission denied

[root@ip-172-31-29-42 work]# ansible -i hosts -u root all -m ping
52.213.129.63 | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).\r\n",
"unreachable": true
}
34.253.133.33 | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).\r\n",
"unreachable": true
}
34.245.231.98 | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).\r\n",
"unreachable": true
}

Lab 6: very unclear instructions for GitHub

You are almost required to know git in order to complete this lab.

I suggest that a disclaimer in the top reads "you can skip this lab if you know git".

Then make the instructions more clear on how to use git with step by step instructions.

Naming - Control server

In the labs we are referring to control server. In the machine info about the labs containing IP and username we say Ansible Tower (not control server). Maybe we should change the description in the labs calling it ansible tower instead.

gitlab server provisioning fails

PLAY [setup stuff in Gitlab VMs] ***************************************************************************************

TASK [Gathering Facts]
This is before I setup the gitlab key. Is it expected for the playbook to fail then?
@teemu-u @pgustafs


The authenticity of host '18.196.100.102 (18.196.100.102)' can't be established.
ECDSA key fingerprint is SHA256:eFbgxanqdTzH8pOsO1PJk4nmRPmmjinrZkwaNowkA8k.
Are you sure you want to continue connecting (yes/no)? yes
fatal: [18.196.100.102]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Warning: Permanently added '18.196.100.102' (ECDSA) to the list of known hosts.\r\[email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).\r\n", "unreachable": true}
to retry, use: --limit @/Users/mglantz/code/github/ansible-roadshow/content/provision-all.retry

Lab1 :

where X,Y,Z are replaced by the numbers for servers assigned to you.

should be

client_system_X,client_system_Y,client_system_Z are replaced by the IPs for servers assigned to you.

Lab1, tower server can't reach managed nodes over ssh

$ ansible -i hosts all -m ping
wildfly2 | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: ssh: connect to host 34.240.6.124 port 22: Connection timed out\r\n",
"unreachable": true
}
wildfly1 | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: ssh: connect to host 52.210.56.118 port 22: Connection timed out\r\n",
"unreachable": true
}
loadbalancer1 | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: ssh: connect to host 34.241.117.172 port 22: Connection timed out\r\n",
"unreachable": true
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.