On Thu, Oct 25, 2018 at 2:20 PM Mauricio Tavares <raubvo...@gmail.com> wrote:
>
> On Thu, Oct 18, 2018 at 10:28 AM S C Rigler <rigle...@gmail.com> 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
>
      NVM, package
(https://docs.ansible.com/ansible/latest/modules/package_module.html)
can't be forced. Yeah, I am trying to abstract as much as possible. I
guess I will try to uninstall and then reinstall package manually

> > On Thu, Oct 18, 2018 at 9:02 AM Mauricio Tavares <raubvo...@gmail.com> 
> > 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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAHEKYV7e_cHQXY_8zjWVDZptVSQiXNP4osdxKfzrmkBvYuC-yQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to