Prázdny

Zmeňte digitálnu budúcnosť projektom Open Sovereign Cloud

Prejdite do sveta prvotriedných cloudových služieb, digitálnych riešení a objavte nové možnosti modernizácie IT.

Prázdny
Ansible

1) Consider the following playbook:
# playbook name: /home/ansible/web.yml
---
- hosts: webservers
become: yes
  tasks:
    - name: edit file 1
      lineinfile:
        path: /var/www/content.hml
        line: "{{ text }}"
      tags:
        - content
    - name: edit file 2
      lineinfile:
        path: /var/www/index.hml
        line: "{{ text }}"
      tags:
        - web
    - name: edit file 3
      lineinfile:
        path: /var/www/etc.hml
        line: "{{ text }}"
      tags:
        - content
        - misc

How do we run it without editing /var/www/content.hml





2) Which command is the correct way to run the playbook
/home/ansible/Buildwww.yml using the inventory file /home/ansible/inventory, assuming your present working directory is /home/ansible?





3) How can you make a playbook gather facts?





4) What keyword makes Ansible not exit on error and continue play execution?





5) Which of the following are valid flags for the ansible-playbook command? (Choose all that apply)





6) Consider the following playbook.
---
- hosts: local
tasks:
    - name: edit file
      block:
        - lineinfile:
            path: /tmp/file
            line: "hello world!"
      rescue:
        - debug: msg="File does not exist."

What happens if /tmp/file is not available?





7) Consider the following playbook.
---
- hosts: local
become: yes
  tasks:
    - name: create users
      user:
        name: "{{item}}"
      with_items:
        - sam
        - john
        - bob

How many times is the user module invoked?





Docker

1) Which of these best describes Docker?





2) Which of these best describes the Host network in Docker?





3) Which of these commands returns low-level information on Docker objects?





4) What are the two ways to use volumes when creating a container?






5) Based off of the contents of the Dockerfile below, how many layers are created?

FROM ubuntu:15.04
RUN apt-get update -y && apt-get install git -y
COPY . /app
RUN make /app
CMD python /app/app.py





6) When using the --mount option, which of the following parameters would you use to indicate that the container should have access to the host filesystem?





CI

1) What does a good CI process do when a build fails?





2) What is Continuous Integration?





3) What steps are in Continuous Integration?





4) _________________ is the ability to get changes of all types—including new features, configuration changes, bug fixes and experiments—into production, or into the hands of users





5) _____________ allows any change made in the code to be tested immediately





GIT

1) What command is used to modify your personal Git configuration to add your email address to all Git repos that your user manages?





2) How do you remove a file from Git's tracking?





3) What is the Git command to make sure your current data matches upstream?





4) What is the default file that contains patterns telling Git what not to track?





5) How do you tell Git you're finished making changes to the repository for now, and to update the metadata with a comment stating what changes you made?





SHELL

1) You have a script that contains a statement that you want to use to evaluate positional parameter 1 with, and if the contents of $1 matches a particular string, to run a command, otherwise you want the script to exit.

What is the common name of the scripting construct being referred to?





2) You want your script to run a test and determine if the cloud_user is the one running the script and if so, echo a greeting to that user. If it's not being run by the cloud_user, it should exit immediately.

Pick the command sequence that will cause this to happen as described.





3) What is the purpose of the following line in a script?
#!/bin/bash





4) You have two commands that you want to run, but you only want the second command to run if the first succeeds and returns an exit code of "0".
What characters would you separate these commands with to ensure this happens as specified?






5) You have a script where math operations are being performed and you see the sequence of commands below. What is result of the final echo statement? Choose the most likely answer.

$ let a=5 $ let b=10 $ let c=$a*$b $ echo $c





6) Which of the following are valid file descriptors? Choose all that apply.







PYTHON

1) Which of these values CANNOT be used as a key in a dictionary?





2) What type of loop would you use to create an infinite loop in Python?





3) How would you get a lowercase version of a string?





4) How would you get the value of the key 'color' from a dictionary called favorites? Note: 'color' is a string.





5) What keyword is used for a secondary condition in an if/else group?





NETWORK

1) What are two types of topologies?





2) Which statement is true about an IPv6 address?





3) What is each number in an IPv4 address called?





4) Which OSI layer is responsible for routing?





5) How many bits are an IPv4 address?





TERRAFORM

1) Which of the following best describes Terraform providers?





2) How can Terraform input variables be defined?





3) What format is the Terraform state file stored in?





4) How can Terraform Providers be sourced in Terraform?





5) Given the following snippet of code:
variable "replicas" {
   type = number
   default = 5
}

What will be passed into the code for the variable replicas when given the following command?

terraform apply -var replicas=1





SEND