Question 36

State whether the following statement is true or false.
A template has a maximum of 10 variables.
  • Question 37

    In /home/sandy/ansible/create a playbook called the play create a logical volume calledIv0and make it of size 1500MiB on volume group If there is not enough space in the volume groupprinta message
    "Not enough space for logical volume" instead. If the volume group still doesn't exist, create a message"Volume group doesn't exist" filesystem on allIv0logical volumes. Don't mount the logical volume.

    Question 38

    Consider the following playbook.
    ---
    - hosts: web1
    become: yes
    tasks:
    - name: use yum
    yum:
    name=httpd
    state=latest
    - name: use service
    service:
    name=httpd
    state=started
    enabled=yes
    - hosts: media1
    become: yes
    tasks:
    - name: use service
    service:
    name=mariadb
    state=started
    when:
    - ansible_hostname == "web1"
    - name: use service
    service:
    name=firewalld
    state=stopped
    What service is started on the host media1?
  • Question 39

    Create a playbook called issue.yml in /home/sandy/ansible which changes the file /etc/issue on all managed nodes: If host is a member of (lev then write "Development" If host is a member of test then write "Test" If host is a member of prod then write "Production"

    Question 40

    Why is it important to create a namespace for role variables?