Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ansible provisionning #217

Open
wants to merge 8 commits into
base: master
from

Conversation

Projects
None yet
4 participants
@itwars
Copy link

itwars commented Mar 11, 2019

Hi,
My proposal is to add a contrib directory. I've done all Ansible stuff to provision a k3s cluster.
Download task is durty because I can' t get k3s version number, so in case of reprovisionning I remove k3s binary and reload it (need to be fixe in future release : #211 ).
For now I've test it with KVM Debian instances. In few days I'll make it happen for ubuntu and Centos.

I wrote setup process for Alpine Linux in README.

Best regards,
Vincent

itwars added some commits Mar 11, 2019

@itwars itwars changed the title Ansible provisionning for Debian Ansible provisionning Mar 13, 2019

itwars added some commits Mar 13, 2019

Show resolved Hide resolved contrib/ansible/README.md Outdated
Show resolved Hide resolved contrib/ansible/roles/download/tasks/main.yml Outdated

itwars added some commits Mar 18, 2019

@MQasimSarfraz
Copy link

MQasimSarfraz left a comment

Overall the playbook looks good but missing ansible tags which is super helpful when running specific tasks.

path: /var/lib/rancher/k3s/server
mode: "{{ p.stat.mode }}"

#- debug: msg="Node TOKEN {{ token }}"

This comment has been minimized.

Copy link
@MQasimSarfraz

MQasimSarfraz Mar 18, 2019

How about using ansible tags here with ['never', 'k3s-debug-logs'] this will make sure the task is only executed once you ran the playbook with -e k3s-debug-logs=true.

owner: root
group: root
mode: 755
when: ( ansible_facts.userspace_architecture == "x86_64" )

This comment has been minimized.

Copy link
@galal-hussein

galal-hussein Mar 22, 2019

Contributor

I think it can be done by constructing a dictionary of values and combine all these tasks into one:

binary_map = {
"x86_64": "k3s"
"arm_64": "k3s-arm64"
...
}

This comment has been minimized.

Copy link
@itwars

itwars Mar 31, 2019

Author

I don't know how to make it work could you pls help me and perhaps make a PR on my repo: https://github.com/itwars/k3s-ansible ?

group: root
mode: 0755

- name: Enable and check K3s service

This comment has been minimized.

Copy link
@galal-hussein

galal-hussein Mar 22, 2019

Contributor

can we use handler here instead of restarting every time

@liyimeng

This comment has been minimized.

Copy link
Contributor

liyimeng commented Apr 9, 2019

We already have a simple system like this, why bother with ansible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.