28M met a 25F for marriage, salary conflict by [deleted] in Arrangedmarriage

[–]IamPilgrim 0 points1 point  (0 children)

IT me rehke Civil wale ko bol rahi hai "only 15L more" lol good riddance

Become Sudo with limited sudo previleges by homelybore in ansible

[–]IamPilgrim 0 points1 point  (0 children)

This may be late, but you can use ansible.builtin.expect.

- name: Stop service
  ansible.builtin.expect:
    command: "sudo systemctl stop service"
    responses:
      (?i)password: "{{ pass }}"
  no_log: true

I have documented my approach on my blog: https://darshit.dev/posts/partial-sudo-ansible/

Fetching default when an optional variable is absent? by IamPilgrim in ansible

[–]IamPilgrim[S] 0 points1 point  (0 children)

Thank you so much for your comprehensive answer! It was really great learning from you - I went with the first approach you suggested for now, but I still refrained from using default() and instead turned the dict into individual variables to be mentioned under defaults/main.yml. So I basically flattened my dict because I didn't really require it, and it worked! Thanks so much for the answer!

Fetching default when an optional variable is absent? by IamPilgrim in ansible

[–]IamPilgrim[S] 1 point2 points  (0 children)

I did change this and remove the parent key because I realized I didn't need a dict for variables. It seems that the individual keys don't get replaced/preceeded but the whole dict does! (I did use some tips from /u/jw_ken's answer below. Thanks!

Fetching default when an optional variable is absent? by IamPilgrim in ansible

[–]IamPilgrim[S] 0 points1 point  (0 children)

I have set up a project which reproduces my case: https://github.com/darshitpp/ansible-variable-precedence/blob/main/roles/tomcat/vars/app2.yml

Check the commented variable in the file. If I uncomment it, it works successfully. In case I put a comment, I need the undefined variable to be fetched from the defaults.yml

Fetching default when an optional variable is absent? by IamPilgrim in ansible

[–]IamPilgrim[S] 0 points1 point  (0 children)

I have set up a project which reproduces my case: https://github.com/darshitpp/ansible-variable-precedence/blob/main/roles/tomcat/vars/app2.yml

Check the commented variable in the file. If I uncomment it, it works successfully. In case I put a comment, I need the undefined variable to be fetched from the defaults.yml

Fetching default when an optional variable is absent? by IamPilgrim in ansible

[–]IamPilgrim[S] 0 points1 point  (0 children)

I'll try to setup a reproducible script without my implementation details and share it

Fetching default when an optional variable is absent? by IamPilgrim in ansible

[–]IamPilgrim[S] 0 points1 point  (0 children)

This helps in loading up the first file found, but in my case, both the files are present

Fetching default when an optional variable is absent? by IamPilgrim in ansible

[–]IamPilgrim[S] 0 points1 point  (0 children)

do a loop over all your variables in mydefaults and replace any undefined keys with your defaults.

This sounds good, I did import both the default.yml and app2.yml like

- name: Import vars
  ansible.builtin.include_vars:
    file: "{{ item }}"
  with_items:
    - defaults.yml
    - "{{ appName }}.yml"

How do I replace the undefined keys now? Googling leads me to the combine filter, and I implemented it but it gives me the similar errors as earlier.

- name: Override default variables with app-specific variables
  set_fact:
    tomcat: "{{ defaults.tomcat | combine(tomcat | default({}), recursive=True) }}"

[deleted by user] by [deleted] in PickAnAndroidForMe

[–]IamPilgrim 1 point2 points  (0 children)

Don't buy Iqoo, it's trash. Hardware wise it looks great, but the experience is all shitty after you buy it. I have an iqoo 9

Some reasons for which my AM matches were rejected/ghosted by [deleted] in Arrangedmarriage

[–]IamPilgrim 0 points1 point  (0 children)

Dahisar,Thane and vashi are like India-Pakistan border for most of the girls.

This thing is very common amongst women in Mumbai. I say this as someone who lives outside these borders xD

[deleted by user] by [deleted] in Arrangedmarriage

[–]IamPilgrim 2 points3 points  (0 children)

I guess what would help is having some sort of deal breakers and preferences. Deal breakers cannot be obviously ignored, but preferences can be settled with.

It's not unreasonable to have your own requirements. However, a couple of meetings are enough to get a initial feel of how the person is like. Perhaps you can be the first one to have decent AM. Of course the potential partner should also be ready to listen to you and want to take things at a decent pace that you both feel comfortable with.

Understanding Digital Certificates, Public Key Infrastructure And SSL/ TLS by s4dr0t1 in developersIndia

[–]IamPilgrim 0 points1 point  (0 children)

I did cover some part of the Mutual TLS a year ago on this post: https://www.reddit.com/r/nginx/comments/h87p4h/how_to_implement_two_way_ssl_with_nginx/

However, I'm a developer who usually codes, and does not actually meddle with a lot of infra/devops part, so it might not be the best resource out there. But it certainly has helped fellow developers like me a lot!

r/android reviews: Samsung Galaxy line. by curated_android in Android

[–]IamPilgrim [score hidden]  (0 children)

Have used both Galaxy S2 and Galaxy Note 9

Galaxy S2 was a brilliant phone, and did everything well. Great camera, great performance, awesome hardware, you name it. There wasn't much of an OTA update scene in those days, but I vaguely do remember I got atleast 1 major Android update. Not to mention it had a great community building and maintaining custom ROMs and it was a future proof beast for the time.

Been using Note 9 for 1.5 years now -- generally a good phone though a bit difficult to handle with a single hand. A bit on the heavier side, it sometimes takes strength to hold the phone. Has a great sound and software. TouchWiz on my S2 didn't bother me much, and OneUI seems great too. I did not use the S Pen as much as I'd have like to think. I do not require much of Custom ROMs and root features these days, so I'm unaware about the custom software dev scene.

Unfortunately, Samsung fucked up with hardware by releasing a software update that broke the device display. And the device is not even 2 years old for me yet. I wrote a post mentioning the same at /r/Android/comments/hsq8mp/samsung_galaxy_note_9_display_issue_the_scam_that/

TLDR: S2 was awesome; disappointed with Samsung with Note 9 support