community.general.make (3.8.10) — module

Run targets in a Makefile

Authors: Linus Unnebäck (@LinusU) <linus@folkdatorn.se>

Install collection

Install with ansible-galaxy collection install community.general:==3.8.10


Add to requirements.yml

  collections:
    - name: community.general
      version: 3.8.10

Description

Run targets in a Makefile.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Build the default target
  community.general.make:
    chdir: /home/ubuntu/cool-project
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Run 'install' target as root
  community.general.make:
    chdir: /home/ubuntu/cool-project
    target: install
  become: yes
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Build 'all' target with extra arguments
  community.general.make:
    chdir: /home/ubuntu/cool-project
    target: all
    params:
      NUM_THREADS: 4
      BACKEND: lapack
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Build 'all' target with a custom Makefile
  community.general.make:
    chdir: /home/ubuntu/cool-project
    target: all
    file: /some-project/Makefile

Inputs

    
file:
    description:
    - Use a custom Makefile.
    type: path

jobs:
    description:
    - Set the number of make jobs to run concurrently.
    - Typically if set, this would be the number of processors and/or threads available
      to the machine.
    - This is not supported by all make implementations.
    type: int
    version_added: 2.0.0
    version_added_collection: community.general

make:
    description:
    - Use a specific make binary.
    type: path
    version_added: 0.2.0
    version_added_collection: community.general

chdir:
    description:
    - Change to this directory before running make.
    required: true
    type: path

params:
    description:
    - Any extra parameters to pass to make.
    type: dict

target:
    description:
    - The target to run.
    - Typically this would be something like C(install),C(test) or C(all)."
    type: str