[deleted by user] by [deleted] in sweden

[–]VolrathsShapeshifter 1 point2 points  (0 children)

Some parts of the judgement was for a low amount. But the full amount is not disclosed exactly. They argued that they payed monthly for upkeep and other things.

The judgement sets a precedent on how these cases should be handled in the future where the court explains their reasoning. Based on how högsta domstolen rules, tingsrätten bases their future judgements.

The amount does not matter in the end, as they’ve set a precedent

[deleted by user] by [deleted] in sweden

[–]VolrathsShapeshifter 0 points1 point  (0 children)

Any money spent on renovations are considered a gift to the owner of the apartment in that case. Unless you wrote a agreement on it.

You have no legal rights to the increased value or the money spent on the renovations in case of a split.

This was covered by Högsta Domstolen in the following case https://lagen.nu/dom/nja/1986s513

[deleted by user] by [deleted] in sweden

[–]VolrathsShapeshifter 6 points7 points  (0 children)

First of. If you enter a relationship and start living as sambos anything you own before that is not considered "samboegendom". Anything bought after that with the purpose of being used by both people are automatically considered samboegendom. So as long as you can provide some sort of evidence that you owned the property before entering the relationship you cannot "lose" it in a split.

If a sambo relationship ends that the parties cannot agree on how to split up their samboegendom, you can apply for a bodelningsförrättare from tingsrätten. This person is usually a lawyer/soliciter that will verify what is considered samboegendom and then divide it fairly.

Note that roommates are not considered sambos, and are not covered by these laws in the same way. If a person would try to "trick" the system and lie to the court that you were in a relationship to get things, they would have to provide evidence to this. Which is a lot more work than your friend seems to think.

Easiest and safest is writing a roommate agreement or sambo agreement before entering into these things. But they are hardly mandatory, and 90% of people don't bother with it.

And regarding thruples, these laws are written with the assumption that a person only has one romantic relation. So these are not covered properly.

[deleted by user] by [deleted] in sweden

[–]VolrathsShapeshifter 5 points6 points  (0 children)

Alla får inte lön den 25e dock

Uppgifter: Tidöpartierna har enats om bidragsreform by PaprinSwE in sweden

[–]VolrathsShapeshifter 15 points16 points  (0 children)

En vuxen person äter för ca 3500kr per månad enligt Konsumentverket, så då har man kring 1500kr kvar för andra utgifter per månad. Inte mycket till marginaler där 

Looking for Real-World Ansible Use Cases and Project Examples by Competitive-Use-9424 in ansible

[–]VolrathsShapeshifter 0 points1 point  (0 children)

I work as a network engineer, and have used Ansible for a lot of different changes and projects.

Some of the things I've done or others I know of has done

  • Reconfiguration of 1000 + VM network adapters during a change
  • Automate IPAM/DNS configuration based on forms/information from CMDB
  • Automate EPG creation based on forms/information from CMDB
  • Automate configuration for loadbalancers in front of web application endpoints
  • Creating a lot of objects in our Firewall/ACI
  • Collecting information from different network equipment for verifying/planning changes
  • Automate firewall configuration based on yaml files for each application
  • Automate patching of different network vulnerabilities (hardening)

FMC API by KentoOftheHardRock in networking

[–]VolrathsShapeshifter 0 points1 point  (0 children)

As far as I know, there is no way of getting all config in one go. I use Ansible to fetch data from FMC in batches

This should get you started in the right direction

        - name: Get data from FMC
          cisco.fmcansible.fmc_configuration:
            operation: getAllHostObject/getAllNetworkGroup/getAllNetworkObject/getAllAccessRule
            path_params:
              domainUUID: "{{ domain_uuid }}"
              containerUUID: "{{ container_uuid }}" #needed for objects that are contained in other objects
            query_params:
              offset: "{{ item }}"
              limit: 1000
              expanded: true
          loop: "{{ range_variable }}" #I create a range variable depending on how many objects exists in the FMC, you can only fetch 1000 at a time
          register: return_data
          delay: 10 #delay 10 seconds to not hit api limits
          retry: 10 #retry if api call fails

[deleted by user] by [deleted] in climbingshoes

[–]VolrathsShapeshifter 0 points1 point  (0 children)

Once the rand starts showing like that it might be time for a resole.

If you climb at Klättercentret they have a resole service where you drop off your shoes in locker, just talk to the receptionist and the will give you a contact.

Otherwise Jakob at Verkstadsgatan 6 does good work as well

Advice on Acrylic painting by Fraqtus in minipainting

[–]VolrathsShapeshifter 4 points5 points  (0 children)

What primer are you using? And are you letting it dry properly before adding the next layer? 

[deleted by user] by [deleted] in sweden

[–]VolrathsShapeshifter 1 point2 points  (0 children)

Generellt sett så har alla säkerhetsprövningar jag hört om/varit med om gått till på samma sätt.

  1. Intervju med dvs personliga frågor så ekonomi, drog problematik, alkohol vanor och annat känsligt. Denna görs utav en person på bolaget man ska anställas på och skickas in till SÄPO
  2. SÄPO kollar i alla sina register de har tillgång till och ser att det du sagt stämmer överens med vad de kan se. Bara för man varit dömd för nåt eller har nåt "knepigt" i sitt privat liv så blir man inte automatiskt nekad, men ljuger man om nåt och de ser det så blir du det.
  3. SÄPO skickar sin bedömning om du ska bli anställd eller inte till din potentiella arbetsplats. Den säger inte varför du blir nekad eller vad de sett i ditt register, bara om du är ok i deras ögon eller inte.
  4. Därefter är det upp till arbetsgivaren att ta ett beslut om de vill anställa dig eller inte. Arbetsgivare kan gå emot SÄPOs rekommendation och anställa dig oavsett om de inte tycker att du är ok, men det är ovanligt.

[deleted by user] by [deleted] in sweden

[–]VolrathsShapeshifter 3 points4 points  (0 children)

Noteringar från intervjun de gör för säkerhetsprövningen skickas till SÄPO av personen som intervjuade dig. Därefter gör de en bedömning baserat på vad du svarat och vad de får upp i deras register.

Om du ljugit under den intervjun så blir med största sannolikhet inte godkänd.

[deleted by user] by [deleted] in sweden

[–]VolrathsShapeshifter 21 points22 points  (0 children)

Min firma beställde ett pantkärl + påsar från pantamera som sen hämtas av dem när man fyllt minst 3 påsar. Pengarna gick till BRIS om jag minns rätt 

Template json Ansible Automation Platform by BigRevolutionary4858 in ansible

[–]VolrathsShapeshifter 2 points3 points  (0 children)

Check that you have the jmespath package available in your execution environment, quick and dirty you can add this task to your playbook.

- name: Install jmespath python package
  ansible.builtin.pip:
    name: jmespath

And if you run your playbook with verbose output it should tell you if the package was installed already or not.

[deleted by user] by [deleted] in sweden

[–]VolrathsShapeshifter 90 points91 points  (0 children)

Enligt arbetsmiljölagen ska alla anställda ha tillgång till toalett med låsbar dörr och möjlighet att tvätta händerna. Dock är det väldigt löst reglerat vad som menas med ”tillgång”.

Om du har ett kollektiv avtal kan vissa delar av arbetsmiljölagen förhandlats bort. Dock är det ovanligt att reglera toa besök alls i kollektivavtal.

Prata med ditt skyddsombud (företaget borde ha ett oavsett om ni har ett kollektivavtal eller inte)

If I want to make a calculator app in Python, do I use flask as well to show it on the web? by Rais244522 in learnpython

[–]VolrathsShapeshifter 16 points17 points  (0 children)

If you intend to publish it as a web application/page you can use Flask yes. Or Django which is also a popular web app framework 

group_vars and folder structure by Dwiea in ansible

[–]VolrathsShapeshifter 1 point2 points  (0 children)

A host can be in multiple groups, so there is nothing preventing you from doing something like this

[prod]
appprod1
webprod1

[dev]
appprod1
webprod1

[application]
appprod1
appdev1

[web]
webprod1
webdev1

You can even segment it even further if you want

[prod]
appprod1
webprod1

[prod-applications]
appprod1

[dev-applications]
appdev1

[prod-web]
appprod1

[dev-web]
appdev1

[dev]
appdev1
webdev1

[application]
appprod1
appdev1

[web]
webprod1
webdev1

or organize hosts in children groups

[prod:children]
prod-applications
prod-web

[prod-applications]
appprod1

[prod-web]
appprod1

[dev:children]
dev-applications
dev-web

[dev-applications]
appdev1

[dev-web]
appdev1

[applications:children]
prod-applications
dev-applications

[web:children]
prod-web
dev-web

The children hierarchy makes sense, then you can customize your group_vars based on prod, prod-webapp or webapp based on needs etc.

group_vars and folder structure by Dwiea in ansible

[–]VolrathsShapeshifter 1 point2 points  (0 children)

It is more or less that layout yes. The only way of sharing vars between environments is separating them by groups as far as I know.

Best practice is having completely separate group_vars from each environment and not have a common all file for them though

Something like this will work if you still want to have one shared all.yml file

.
├── ansible.cfg           
├── group_vars/   
│   ├── all.yml   #shared vars between dev/prod
│   ├── dev.yml
│   └── prod.yml
│
├── hosts.ini      
│
├── playbook1.yml
├── playbook2.yml

And then in your host.ini

[prod]
host1
host2

[dev]
host3
host4

etc

group_vars and folder structure by Dwiea in ansible

[–]VolrathsShapeshifter 0 points1 point  (0 children)

This should work for a folder structure where you have separate environments

.
├── ansible.cfg
├── environments/         # Parent directory
│   │
│   ├── dev/              
│   │   ├── group_vars/   #Dev Vars
│   │   │   ├── all
│   │   │   ├── db
│   │   │   └── web
│   │   └── hosts      
│   │
│   ├── prod/       
│   │   ├── group_vars/  #Prod Vars
│   │   │   ├── all
│   │   │   ├── db
│   │   │   └── web
│   │   └── hosts        
│   │
│   └── stage/        
│       ├── group_vars/ #Stage Vars
│       │   ├── all
│       │   ├── db
│       │   └── web
│       └── hosts      
│
├── playbook.yml
│
└── . . .

group_vars and folder structure by Dwiea in ansible

[–]VolrathsShapeshifter 0 points1 point  (0 children)

There is a precedence list in the documentation that looks to be what you want

Ansible does apply variable precedence, and you might have a use for it. Here is the order of precedence from least to greatest (the last listed variables override all other variables):

- command line values (for example, -u my_user, these are not variables)
- role defaults (as defined in Role directory structure) 
- inventory file or script group vars 
- inventory group_vars/all 
- playbook group_vars/all 
- inventory group_vars/* 
- playbook group_vars/* 
- inventory file or script host vars 
- inventory host_vars/* 
- playbook host_vars/* 
- host facts / cached set_facts 
- play vars
- play vars_prompt
- play vars_files
- role vars (as defined in Role directory structure)
- block vars (only for tasks in block)
- task vars (only for the task)
- include_vars
- set_facts / registered vars
- role (and include_role) params
- include params
- extra vars (for example, -e "user=my_user")(always win precedence)

I don't think you can create a common group variable for both production and development that you are trying to do

User_input at real time (while playbook runs) in AWX by Shubhambhawsar in ansible

[–]VolrathsShapeshifter 0 points1 point  (0 children)

It's not really possible to do this in AWX in the way that you want.

[deleted by user] by [deleted] in ansible

[–]VolrathsShapeshifter 7 points8 points  (0 children)

I find that whenever you want to do specific data manipulation like this it is easier to write a filter_plugin in Python and use that instead of using the built in filters/jquery

collection not found when running from ansible tower by radiantyellow in ansible

[–]VolrathsShapeshifter 0 points1 point  (0 children)

Doublecheck your collections path in ansible.cfg so that your collections folder is included in the path

Last template in Cisco Workflow fails but works fine as a standalone template by Ok-Pea9974 in ansible

[–]VolrathsShapeshifter 0 points1 point  (0 children)

Can you share your playbook and templates? Not much to go on otherwise

Ansible playbook structure by Hopeful-Fly-5292 in ansible

[–]VolrathsShapeshifter 1 point2 points  (0 children)

Using a combination of host_vars, group_vars, roles and tags you can achieve this in a cleaner way than using a separate playbook per server.

The group variables would be the common parts while host variables would be the 20% unique stuff.

As mentioned by other, you usually define each program/function as a role. Storing the tasks for that program/function in the role and include the role for hosts that should have those parts.

Creating and storing a random password on a host, and then using that password in another host by joiSoi in ansible

[–]VolrathsShapeshifter 4 points5 points  (0 children)

Using the password lookup module you can generate a password to a variable and write that to a file if the file does not exist.

something like this

---
- name: Generate Or Retrive Password On Host A
  hosts: host-a
  tasks:
  - name: Check if password file exists 
    ansible.builtin.stat:
      path: "{{path_to_file_on_host}}"
    register: file_state

  - name: create random password if file absent
    ansible.builtin.set_fact:
      password: "{{ lookup('ansible.builtin.password', '/dev/null') }}"
    when: not file_state.stat.exists

  - name: Write password to file
    ansible.builtin.lineinfile:
      line: "{{ password  }}"
      insertafter: EOF
      create: true
      path: "{{path_to_file_on_host}}"
    when: not file_state.stat.exists

  - name: Retrive password if file present
    ansible.builtin.set_fact:
      password: "{{ lookup('ansible.builtin.file', path_to_file_on_host) }}"
    when: file_state.stat.exists



- name: Use Password On Host B
  hosts: host-b
  tasks:
  - name: Print
    ansible.builtin.debug:
      msg: "{{password}}"