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, 2019 in Ansible by Den
1,095 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, 2019 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, 2019 in Ansible by Aarohi
1,322 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,680 points
1,136 views
0 votes
1 answer
+15 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,039 views
+2 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, 2019 in Ansible by Bobin
14,393 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, 2019 in Ansible by Nigya

edited Jan 18, 2019 by Vardhan 9,546 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP