On Thu, Oct 18, 2018 at 10:28 AM S C Rigler <[email protected]> wrote:
>
> Assuming you're using RPM, files that are marked "config" files in the
> package will not be overwritten by package upgrades (that's how you
> end up with ".rpmnew" files). But if you have missing files you can
> file them by looking at the output of "rpm -V". Then think of some
> creative way to trigger a reinstall of the package based on that.
Let's make sure I understand what you are saying. If I have something like
- name: Install package Foo
package:
name: "{{ foo_packages }}"
update_cache: yes
state: latest
even though /etc/foo.conf is part of the package, deleting it will not
trigger a reinstall because it will not be overwritten during an
upgrade, right? If that is the case, I would need to do something like
- name: Check if the Foo config is installed
stat:
path: "{{ Foo_config }}"
register: foo_config
and then trigger an reinstall if foo_config.stat.exists == False
> On Thu, Oct 18, 2018 at 9:02 AM Mauricio Tavares <[email protected]> wrote:
> >
> > As you know some packages install their config files/dir during
> > the normal package installation (the first examples that popped in my
> > mind are postfix, bind, and apache). I understand that if the
> > configuration file I am editing using ansible is different than the
> > one I providing (as file or template), it will be overwritten back
> > into the desired state next time ansible is run. But, let's say one of
> > the other files in that config file is missing. Or I was bored and
> > deleted the entire config dir. How would I detect it? I take if I do
> > detect I would then want to reinstall said package and then run my
> > customization, right?
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Ansible Project" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to [email protected].
> > To post to this group, send email to [email protected].
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/ansible-project/CAHEKYV5iGg3cWk5NiwEXhystr1KMCBP3dQnWWKwiWUJt25qjEA%40mail.gmail.com.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAFbiokdVGZcQ9_m4zriZZKTQD1U0HTb_yegJBqh_njerFtpDuQ%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAHEKYV5rCdGdwUmvs41KVj0muH-p9TbQdben4xSS2EDOWtLFng%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.