Skip to content

feature-request: run a command IF a condition passes #312

@Clumsy-Coder

Description

@Clumsy-Coder

just like LINK directive, there should one for running individual commands for SHELL directive.

Ex:

- shell:
    - command: apt update && apt upgrade -y
      if: lsb_release -i | grep -io 'debian'
      description: Update APT package repository

    - command: dnf update -y
      if: lsb_release -i | grep -io 'fedora'
      description: Update DNF package repository

why

  • provides a better flow of running dotbot process
  • can contain similar commands in a single shell directive.
    • Ex: shell directive for updating repositories
    • Ex: installing a package using package manager in one OS, downloading a script from another OS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions