Jeff
Jeff

Reputation: 11

saltstack remove part of configuration

I deployed this state, this is all installed. I do not want to remove all of it only php5. How can I do this with salt leaving the other tools in tact?

webserver_stuff:
  pkg:
    - installed
    - pkgs:
      - apache2
      - php5
      - php5-mysql

Upvotes: 1

Views: 1154

Answers (1)

Gijs Brandsma
Gijs Brandsma

Reputation: 983

You probably need pkg.purged.

This makes sure the package is not installed anymore. You can make an extra state for it like this:

webserver_stuff:
  pkg.installed
    - pkgs:
      - apache2
      - php5
      - php5-mysql

php5:
  pkg.purged: []

Upvotes: 2

Related Questions