Ansible Playbook to get k8s authentication result

0 votes
I have created a k8s cluster and would like to write an Ansible playbook to k8s authentication result. How do I do that?
Jun 11 in Ansible by Den
49 views

1 answer to this question.

0 votes

Hey @Den, try something like this:

- hosts: localhost
  module_defaults:
    group/k8s:
      host: host-name
      ca_cert: ca.pem
  tasks:
  - block:
    - include_vars: passwords.yml

    - name: Log in
      k8s_auth:
        username: admin
        password: "{{ k8s_admin_password }}"
      register: k8s_auth_results
answered Jun 11 by Faiza

Related Questions In Ansible

0 votes
1 answer

Playbook to get my current IP - Ansible and AWS

Hey Komal, that's pretty simple. Try this: - ...READ MORE

answered Mar 24 in Ansible by Aarohi
62 views
0 votes
1 answer

devops , how to create user using ansible playbook

root doesn't need a password to switch ...READ MORE

answered Jul 16, 2018 in Ansible by Kalgi
• 2,620 points
126 views
0 votes
1 answer
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
186 views
0 votes
1 answer
+1 vote
4 answers

Pass variable to ansible playbook through command line

ansible-playbook test.yml --extra-vars "arg1=${var1} arg2=${var2}" Use is like ...READ MORE

answered May 7 in Ansible by Bobin
3,849 views
0 votes
1 answer

Ansible playbook for moving files from one node to another remote node

The best way to do this is: copy ...READ MORE

answered Jan 16 in Ansible by Nigya

edited Jan 18 by Vardhan 1,123 views