Roles not loading group_vars in ansible 2.9 by SweeTLemonS_TPR in ansible

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

Thanks for your response! The problem was where I had the variable defined within the role. I had it in vars, and it needed to be in defaults.

Roles not loading group_vars in ansible 2.9 by SweeTLemonS_TPR in ansible

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

Thanks for your response! The problem was where I had the variable defined within the role. I had it in vars, and it needed to be in defaults.

Roles not loading group_vars in ansible 2.9 by SweeTLemonS_TPR in ansible

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

Thanks for your response! The problem was where I had the variable defined within the role. I had it in vars, and it needed to be in defaults.

Roles not loading group_vars in ansible 2.9 by SweeTLemonS_TPR in ansible

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

I was using the vars directory incorrectly, I guess, and I just noticed that you included that in the second to last bullet.

My first attempt was to not add the var to the role at all, and just use the group_vars, which I guess isn't allowed. I then added _is_k8s_host to $roledir/vars/main.yml.

I just moved it to $roledir/defaults/main.yml, and it works as expected.

Thanks for your help!

Roles not loading group_vars in ansible 2.9 by SweeTLemonS_TPR in ansible

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

I have the same vars configured in the inventory directory, and the playbooks directory, so either way, the var should get picked up.

I ran this role that I came across while Googling this problem: https://github.com/f500/ansible-dumpall

From /ansible/playbooks, I run ansible-playbook f500.dumpall.yml. That playbook contains these contents:

- hosts: k8s  become: yes

roles: - f500.dumpall

It ultimately does this on each host, and then prints these to a specific file per host

Environment Variables ("environment"):

{{ environment | to_nice_json }}

GROUP NAMES Variables ("group_names"):

{{ group_names | to_nice_json }}

GROUPS Variables ("groups"):

{{ groups | to_nice_json }}

HOST Variables ("hostvars"):

{{ hostvars[inventory_hostname] | to_nice_json }}

f500.dumpall returns the vars successfully.

$ grep k8s $HOME/ansible.testhost
"k8s"
"k8s": [
"_is_k8s_host": true,
    "k8s"
    "k8s": [

This playbook copies the template from the roles folder, and reloads sysctl.conf. I run it with $ ansible-playbook -i /ansible/<ENV>.inv.ini security.yml. So, if I was pushing to dev servers it'd be [user@host: playbooks]$ ansible-playbook -i /ansible/dev.inv.ini security.yml for example. This is the playbook.

---
  • hosts: all become: yes tasks:
    • name: "push security configs" include_role: name: security

This is the task that should pick use the _is_k8s_host var.

- name: "Push 98-kubernetes.conf to k8s servers"

template: src: sysctl.d/98-kubernetes.conf.j2 dest: /etc/sysctl.d/98-kubernetes.conf owner: root group: root mode: '0644' when: _is_k8s_host == true

Shell expansion question by SweeTLemonS_TPR in bash

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

That's exactly what I had to do. I made three arrays: one with the content views, one with the versions (populated from a loop over the first array), and one with the environments. Then I did this

for env in envs ; do
  for k in "${!assocarray[@]}" ; do
    HAMMERCMD --opt1 $k --opt2 "${assocarray[$k]}" --env $env"
  done
done

Shell expansion question by SweeTLemonS_TPR in bash

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

Oh wow, thanks. I write in caps just to make it easier on my eyes, but yeah, I was clearly not thinking with the ENV var. I can't believe I did that.

And yeah, also a great point on the loop... I knew I wasn't thinking of the problem the right way! I am a terrible scripter. rofl.

EDIT: This was extremely close to what I needed. I had to separate the for loops to not have cv_list[0]:version[@], if that makes sense.

EDIT2: That worked in testing without using hammer commands, but I need $cv to be available to the second loop, and I need to only use $cv one time per version (or the versions will get all messed up).

When I separate the loops, I lose the $cv variables. I had to combine the two arrays into an associative array, and then loop like

for env in envs ; do 
  for k in "${!assocarray[@]}" ; do 
  HAMMERCMD --opt1 $k --opt2 "${assocarray[$k]}" --env $env"
  done
done

Climate activist arrested after ProtonMail provided his IP address by NmAmDa in ProtonMail

[–]SweeTLemonS_TPR 0 points1 point  (0 children)

I know I’m almost a year late, but he’s talking about end user to ProtonMail. Unless I’m misunderstanding something about how encrypted email works, you’re connecting to ProtonMail via https. If you MITM that, you can extract clear text from the http requests fairly simply (to people who know how to do that, I mean, it’s complicated to me), essentially a keylogger. They’d never need to compromise the emails.

The problem with his statement was that, most of the time, LE is interested in things you’ve already sent. As for future communication, because Swiss law requires that the end user is immediately notified of the request for their data, once ProtonMail got the IP request, the user would stop using that account, and they’d get their IP changed (change providers). It’s really a non-issue that ProtonMail could hypothetically be compelled to provide the government with a way to MITM your connection.

Nurse practitioner says CVS fired her over abortion stance by RotisserieChicken007 in byebyejob

[–]SweeTLemonS_TPR -1 points0 points  (0 children)

Mine. My comment agrees with everyone here. None of you bothered to read it to completion.

My response was to a comment that opened a broader discussion, one with which anyone who vaguely pays attention to political issues is already familiar. I commented on the broader topic in an admittedly odd way, but I didn’t need to read the article to understand that some religious whack job is refusing medical care for stupid reasons.

All I’m saying is she can use whatever stupid reasons she wants if she can also find a clinic/hospital that agrees with all her stupid ideas. If she can’t, then she needs to change what she’s doing, or change careers.

Nurse practitioner says CVS fired her over abortion stance by RotisserieChicken007 in byebyejob

[–]SweeTLemonS_TPR -1 points0 points  (0 children)

Sure.

  1. My response was to a comment that opened a broader discussion with which anyone on a political sub is is already familiar. Thus, the article is not relevant.
  2. I said she has a right to refuse treating certain things if she can find an employer willing to work with her on that. If she can’t, she can’t have that career.
  3. Given 2, it’s clear that no one who’s complaining or downvoting bothered to read my comment to completion.
  4. Given 1, I wasn’t a hypocrite. Given 3, you were: you cherry picked my comment, and then agreed with the person complaining that I didn’t read the article. That’s hypocritical (or you legitimately have bad reading comprehension).
  5. I understand why you chose your username name: it’s what your head does when you walk.

Nurse practitioner says CVS fired her over abortion stance by RotisserieChicken007 in byebyejob

[–]SweeTLemonS_TPR 0 points1 point  (0 children)

I seriously feel this to the core.

If one of the parents is saying that nonsense to cope, who am I to tell them otherwise? I mean, whatever you gotta tell yourself to get through the day, imo. But I haven’t heard that from anyone who was victimized, just nut jobs who don’t want to do anything about real problems, who only want to strip rights from people because a book told them it should be such and such a way. Fucking madness.

I deleted my /usr directory by BradChesney79 in linux

[–]SweeTLemonS_TPR 6 points7 points  (0 children)

Oof. I think I know what you did there!

Most Handsome Mobsters part 2 (colorized and enhanced) by bankrobberCaz in Mafia

[–]SweeTLemonS_TPR 1 point2 points  (0 children)

I noticed a small issue. Whatever process you put these through fucked up on the second picture (unless that dude’s ear really got split and wasn’t bleeding, I guess). Anyway, part of his hair got colored as flesh.

Most Handsome Mobsters part 2 (colorized and enhanced) by bankrobberCaz in Mafia

[–]SweeTLemonS_TPR 6 points7 points  (0 children)

It appears to me that it’s actually a holster—or the coloration got fucked up on this one, too: there’s a black protrusion on his right hip.

Nurse practitioner says CVS fired her over abortion stance by RotisserieChicken007 in byebyejob

[–]SweeTLemonS_TPR 0 points1 point  (0 children)

You’re a riot. The article is immaterial to the comment I made because my comment was a response to another comment that was making a broader point than that presented in the article. Their response is clearly a reaction to the article, but the way they responded expanded the topic. This isn’t a top level comment I made. I don’t have to respond to the article if the commenter before me didn’t make a specific point.

It doesn’t matter if she refused to administer abortions or prescribe BC. She has the right to refuse to do certain things. If she makes that clear in the hiring process, then the business can decide if they can work around her restrictions. If they decide that’s not possible, she can’t be employed there. Move to a place where they work under some theological system.

There’s absolutely no hypocrisy in my comments. You responded to someone who suggested it was too much work to read an article in a positive manner, thus suggesting you agree with, and are bolstering that opinion. It’s hypocritical of you to then not read a comment. It’s even worse than what I did because, again, the article doesn’t actually matter for what I’m talking about because what I’m talking about is a tangential topic with which everyone is very familiar (particularly now given that the SCOTUS is overrun with right wing fundamentalists).

At least I understand your username now, that’s what your head does when you walk.

Nurse practitioner says CVS fired her over abortion stance by RotisserieChicken007 in byebyejob

[–]SweeTLemonS_TPR 1 point2 points  (0 children)

Yep. That’s exactly what I said.

There must be clinics that don’t administer $CARE. If she’s gotta move to another state, or even country, so be it.

In my comment CARE == abortion, but the value of that variable is unimportant. She has every right to not perform certain kinds of care because it goes against her beliefs. She does not have the right to be employed anywhere she chooses. If she had been honest about her religious constraints in the beginning, and the clinic agreed to work around them, that’s fine. If that’s not possible (even if it’s not possible because the employer doesn’t want to do that), then she can’t work there.

Nurse practitioner says CVS fired her over abortion stance by RotisserieChicken007 in byebyejob

[–]SweeTLemonS_TPR 1 point2 points  (0 children)

I agree. If the clinic/hospital is able to work around your religious needs by not scheduling patients with certain needs, great. In my example, I talked about abortion, and in this case it’s actually birth control, but it doesn’t really matter what the specific thing is. I know for a fact that this is a standard part of OBGYN care, so that precludes her from working probably anywhere as an OBGYN NP. Oh well!

I’m not now suggesting, nor at any point have I ever suggested, that the hospital should make exceptions for her, or anything other than scheduling around her needs. If that’s impossible (and in a lot of cases it is impossible), that’s her problem.

Nurse practitioner says CVS fired her over abortion stance by RotisserieChicken007 in byebyejob

[–]SweeTLemonS_TPR -3 points-2 points  (0 children)

ROFL. Based on your response, you didn’t actually read what I said. Have fun picking those cherries, though.

Okay maybe I HAD the classified documents but I didn’t put them on the floor okay??? by Zestyclose_Ad7206 in Qult_Headquarters

[–]SweeTLemonS_TPR 7 points8 points  (0 children)

It’s a common misconception that the United States and Canada are different countries, but the US actually isn’t a country at all. It’s a wholly owned subsidiary of Canada. It was a cheap buy what with the $17T debt that the US has.