Semaphore Docs
Search…
⌃K

Inventory

An Inventory is a file that that stores a list of hosts that for Ansible to run plays against. An Inventory also stores variables that can be used by playbooks. An Inventory can be stored in YAML, JSON, on TOML. More information about Inventories can be found in the Ansible Documentation.
Ansible Semaphore can either read an Inventory from a file on the server that the Semaphore user has read access to or a static Inventory that is edited via the web GUI. Each Inventory also has a at least one credential tied to it. The user credential which is required and is what Ansible uses to log in to hosts for that Inventory and sudo credentials which are used for escalating privileges on that host. It is required to have a user credential that is either a username with a login or an SSH configured in the Key Store to create an Inventory. Information about credentials can be found in the Key Store section of this site.

Creating an Inventory

  1. 1.
    Click on the Key Store tab and confirm you have a key that is a login_password or ssh type
  2. 2.
    Click on the Inventory tab and click New Inventory
  3. 3.
    Name the Inventory and select the correct user credential from the dropdown. Select the correct sudo credential if needed
  4. 4.
    Select the Inventory type
  • If you select file, use the absolute path to the file
  • If you select static, paste in or type your Inventory into the form
  1. 1.
    Click Create.

Updating an Inventory

  1. 1.
    Click on the Inventory tab
  2. 2.
    Click the Pencil Icon next to the Inventory you want to edit
  3. 3.
    Make your changes
  4. 4.
    Click Save

Deleting an Inventory

Before you remove an Inventory, you must remove all resources tied to it. If you are not sure which resources are being used in an environment, follow steps 1 and 2 below and it will show you which resources are using it with links to those resources.
  1. 1.
    Click on the Inventory tab
  2. 2.
    Click the trash can icon next to the Inventory
  3. 3.
    Click Yes if you are sure you want to remove the Inventory