โ† All SAC Flashcard Decks

Automation, Scripting, and Virtualization Flashcards

7 cards from real SAC practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 Automation, Scripting, and Virtualization flashcards as text
  1. Which PowerShell cmdlet is used to iterate over each item in a collection and execute a script block for each?

    Answer: ForEach-Object

    ForEach-Object (alias %) pipes each input object to a script block specified with -Process.

  2. In a Bash script, what does the special variable '$?' hold?

    Answer: The exit status of the last executed command

    $? stores the exit code (0 = success, non-zero = failure) of the most recently executed command.

  3. Which Ansible module is best suited for copying a file from the control node to managed hosts?

    Answer: copy

    The copy module transfers files from the control node (or a remote location) to managed hosts.

  4. What is the purpose of a hypervisor's 'snapshot' feature in a virtualized environment?

    Answer: To capture the state of a VM at a specific point in time

    A snapshot preserves the VM's disk, memory, and configuration state so it can be restored to that exact moment later.

  5. In Python scripting for sysadmin tasks, which module provides functions for interacting with the operating system such as listing directory contents?

    Answer: os

    The os module exposes OS-level calls like os.listdir(), os.getcwd(), and os.path operations.

  6. What does 'idempotency' mean in the context of configuration management tools like Puppet or Ansible?

    Answer: Running the configuration multiple times produces the same result as running it once

    An idempotent operation leaves the system in the desired state regardless of how many times it is applied.

  7. Which virtualization technology allows multiple isolated Linux systems (containers) to run on a single Linux kernel without a separate hypervisor?

    Answer: Linux Containers (LXC)

    LXC uses kernel namespaces and cgroups to isolate containers on the same kernel, eliminating a full hypervisor layer.