liveBook · Manning

Procedural programming

As explained in Acing the CCNA Exam: Volume 2 Advanced Networking and Security

A procedural approach specifies an ordered sequence of operations to achieve a configuration or infrastructure result.

Procedural programming defines an ordered series of steps or tasks that configure a target system. In infrastructure as code, the tool executes those steps rather than determining them from a desired end state. section 25.2 section 25.3

The approach is characterized by:

  • Explicit sequence: each task is performed in a specified order. section 25.2.1
  • Configuration management: playbooks describe Ansible procedures, while Chef recipes group ordered configuration actions into cookbooks. section 25.3 section 25.2.3
  • Operational contrast: declarative tools specify a desired end state and determine how to reach it. section 25.2
  • Delivery model: procedural Ansible automation commonly uses a control node to push changes over SSH or NETCONF. section 25.2.1

Ansible configuration sequence

Ansible uses an inventory to identify managed hosts, templates and variables to produce configuration files, and a YAML playbook to define tasks. Modules perform individual operations in the playbook’s specified order. section 25.3

Figure 25.5 Basic Ansible operations. Inventory, template, and variable files define configurations, and playbooks define actions. The control node uses SSH to connect and push configurations to managed devices.

Trace the Ansible workflow from inventory, template, and variable files through playbook actions and SSH-based configuration pushes. section 25.2.1

How Acing the CCNA Exam: Volume 2 Advanced Networking and Security covers it

How deep it goes
Defines ordered tasks and contrasts them with desired-state automation, but stops short of implementation-level programming internals.
Examples
Uses Ansible playbooks and Chef recipes as ordered configuration procedures, with modules or cookbook components performing individual actions.
What it assumes
Assumes configuration-management context while defining procedural, declarative, push, pull, agentless, and agent-based distinctions.
What you can do after
Apply it via Ansible playbooks or Chef recipes to execute configuration tasks in a controlled sequence.
How it connects
Connects infrastructure as code, configuration management, declarative approach, push model, pull model, agentless tools, playbooks, modules, and recipes.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Acing the CCNA Exam: Volume 2 Advanced Networking and Security. The section links point to the parts of the book it draws on.