Giter Site home page Giter Site logo

mateuszstompor / rhce-ex294-exam Goto Github PK

View Code? Open in Web Editor NEW
79.0 8.0 69.0 96 KB

Repository containing questions preparing for EX294 exam

License: MIT License

ex294 rhce rhce8 rhce-certification redhat exam ansible rhce-exam redhat-certified-engineer

rhce-ex294-exam's Issues

Environment presets

Questions:
-It is important to know how control node and remote nodes are preset.
-All remote nodes should have the same root password? All these commands will been executed by root on remote hosts, because automation user has not been created yet. Does root user on remote nodes should be configured passwordless?
-Why you use sudo instead of using -u root -k?
-First you should add the inventory hosts in known_hosts, because always request validation, unless you deactivate this first. Did you?

sudo ansible all -m user -a "name=automation password={{ 'devops' | password_hash('sha512', 'salt')}}"
sudo ansible all -m authorized_key -a "key={{ lookup('file', '/home/automation/.ssh/id_rsa.pub') }} user=automation"
sudo ansible all -m copy -a 'content="automation ALL=(ALL) NOPASSWD:ALL" dest=/etc/sudoers.d/automation'

04. Group differentiation

The solution do not take care of a detail. the managed3.example.com is member of the webservers and database host group. So the final motd for this server should have 2 lines:

Welcome to MySQL database
Welcome to Apache server

Your solution do not work properly in this case.

03.Archiving solution : Flat parameter missing on the fetch task

In 03.Archiving solution

If flat parameter for the fetch task is not set to true, it try to store file in
/backup/managed4-configuration.gz/managed4.example.com/backup instead of /backup/

from ansible-doc
flat: # Allows you to override the default behavior of appending hostname/path/to/file to the destination.
If `dest' ends with '/', it will use the basename of the source file, similar to the copy module.
This can be useful if working with a single host, or if retrieving files that are uniquely named per host. If using multiple hosts with the same filename, the file will be overwritten for each host.

authorized_key and openssh_keypair are not part ansible core.

authorized_key and openssh_keypair are not part of ansible-core.
And need to be installed separately

ansible-galaxy collection install  community.crypto
ansible-galaxy collection install  ansible.posix

If authorized_key is going to be executed via sudo, like in solution of 2nd exercise ,make sure that the collection is available for root.

sudo ansible-galaxy collection list ansible.posix

Otherwise will get below error.
"The module authorized_key was redirected to ansible.posix.authorized_key, which could not be loaded."
To fix just re-run collection installation through sudo

sudo ansible-galaxy collection install ansible.posix

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.