[ansible-project] Re: Need help

2018-10-28 Thread Sathya Narayanan
Any suggestions/ideas on the below ask? On Sat, 27 Oct 2018, 11:14 pm Sathya Narayanan, wrote: > Hi All, > > I am new to ansible and I would like to understand or get some ideas about > how to use ansible to maintain standard operating system environment. > > For example : I would like to hav

[ansible-project] Problem when dynamically constructing dict variables with string list as values

2018-10-28 Thread Lu Liu
# SUMMARY When dynamically creating a dict var with a list as its value, it's working when the list elements are int but will fallback to a string when the list elements are strings. # ISSUE TYPE - Not sure if this is a bug in Ansible, YAML or Jinja2, or is a feature by design # C

Re: [ansible-project] Need help

2018-10-28 Thread Michael Mullay
Hi Sathya, You could get a list of current packages via 'yum list' or whatever package manager, then use that as the list of packages as the variable, and do something like the following. Maintaining and parsing that 'master' list however might be quite cumbersome. name: remove unwanted packages

Re: [ansible-project] Need help

2018-10-28 Thread Jonathan Lozada De La Matta
I 2nd Michael's comment. On Sun, Oct 28, 2018 at 11:37 AM Michael Mullay wrote: > Hi Sathya, > > You could get a list of current packages via 'yum list' or whatever > package manager, then use that as the list of packages as the variable, and > do something like the following. Maintaining and pa

Re: [ansible-project] Need help

2018-10-28 Thread Frank Thommen
Consider, that with this mechanism you will not detect packages which have been installed directly either by custom installer, the standard configure-make-make install or by directly copying binaries or scripts in some central location. Also keep in mind, that if you omit (or someone removes)

Re: [ansible-project] Need help

2018-10-28 Thread Sathya Narayanan
Thanks frank and micheal for your useful suggestion. The point is, the entire production system is handed over to some third party developers team with sudo privilages ( its is mistake from architecture team) and the client is so dependent on the developing team. The developers are so that, they

Re: [ansible-project] Need help

2018-10-28 Thread Jonathan Lozada De La Matta
a quick solution might be to upgrade those packages that are vulnerable but, that varies by OS flavor and the applications been installed. On Sun, Oct 28, 2018 at 2:11 PM Sathya Narayanan wrote: > Thanks frank and micheal for your useful suggestion. > > > The point is, the entire production syst

[ansible-project] Incorrect timezone for Windows Server?

2018-10-28 Thread ameya agashe
Hey Guys, I have added a timezone task and maybe its buggy or maybe my logic is not quiet right. It is referring to Easter timezone instead of Daylight Timezone, yaml block below: * - name: Set timezone to 'A.U.S. Eastern Standard Time' (GMT+10:00)* *win_timezone:* * timezone: E. Austra

[ansible-project] Re: Incorrect timezone for Windows Server?

2018-10-28 Thread ameya agashe
Hola! I changed to Daylight Timezone and now getting errors as below: FAILED! => {"changed": false, "msg": "The specified timezone: E. Australia Daylight Time isn't supported on the machine.", "previous_timezone": "E. Australia Standard Time", "timezone": "E. Australia Daylight Time"} Yaml bl

[ansible-project] Fail gracefully if no hosts match

2018-10-28 Thread Gonzalo Servat
Hi All I've got an Ansible playbook that I'm running against a custom inventory group I've created. The issue is that this group may or may not be empty. I only want Ansible to exit non-zero if it ran against a host (or hosts) and any of them failed (standard Ansible behavior), but I don't want An

[ansible-project] Re: Fail gracefully if no hosts match

2018-10-28 Thread Vladimir Botka
> > > Running the playbook below with an empty group results in 0 exit code. What am I missing? - hosts: test99 pre_tasks: - debug: var=play_hosts delegate_to: localhost HTH, -vlado -- You received this message because you are subscribed to the Google Groups "An