add freebsd oci tools

main
Andrew Coleman 2021-09-08 00:18:50 -04:00
parent 853791d9e5
commit e48bbf895e
1 changed files with 66 additions and 9 deletions

View File

@ -8,14 +8,14 @@
become: yes
become_user: root
become_method: sudo
when: ansible_facts['system']|lower == 'freebsd'
when: ansible_facts['system']|lower == "freebsd"
community.general.pkgng:
name: sops
state: present
- name: install sops linux
command: curl -Lo ~/.local/bin/sops https://github.com/mozilla/sops/releases/download/v3.7.1/sops-v3.7.1.linux
when: ansible_facts['system']|lower == 'linux'
when: ansible_facts['system']|lower == "linux"
args:
creates: "{{ ansible_env.HOME }}/.local/bin/sops"
@ -23,7 +23,7 @@
become: yes
become_user: root
become_method: sudo
when: ansible_facts['system']|lower == 'freebsd'
when: ansible_facts['system']|lower == "freebsd"
community.general.pkgng:
name: helm
state: present
@ -38,7 +38,7 @@
become: yes
become_user: root
become_method: sudo
when: ansible_facts['system']|lower == 'freebsd'
when: ansible_facts['system']|lower == "freebsd"
community.general.pkgng:
name: kubectl
state: present
@ -53,7 +53,7 @@
become: yes
become_user: root
become_method: sudo
when: ansible_facts['system']|lower == 'freebsd'
when: ansible_facts['system']|lower == "freebsd"
community.general.pkgng:
name: kops
state: present
@ -64,19 +64,28 @@
warn: False
creates: "{{ ansible_env.HOME }}/.local/bin/kops"
- name: clone k9s git
- name: clone k9s-HEAD
ansible.builtin.git:
repo: 'https://github.com/derailed/k9s.git'
dest: "{{ ansible_env.HOME }}/dev/k9s"
- name: build k9s-HEAD
ansible.builtin.shell: "gmake build && install -m 755 ./execs/k9s ~/.local/bin/k9s"
ansible.builtin.command: gmake build
args:
chdir: "{{ ansible_env.HOME }}/dev/k9s"
creates: "{{ ansible_env.HOME }}/.local/bin/k9s"
creates: "{{ ansible_env.HOME }}/dev/k9s/execs/k9s"
- name: install k9s-HEAD
become: yes
become_user: root
become_method: sudo
ansible.builtin.command: install -m 755 ./execs/k9s /usr/local/bin/k9s
args:
chdir: "{{ ansible_env.HOME }}/dev/k9s"
creates: "/usr/local/bin/k9s"
- name: install stern-HEAD freebsd
when: ansible_facts['system']|lower == 'freebsd'
when: ansible_facts['system']|lower == "freebsd"
shell: go get -u github.com/stern/stern
args:
creates: "{{ ansible_env.HOME }}/go/bin/stern"
@ -109,3 +118,51 @@
url: https://raw.githubusercontent.com/ahmetb/kubectx/master/completion/kubens.bash
dest: "{{ ansible_env.HOME }}/.bashrc.d/"
mode: "0640"
- name: clone skopeo-HEAD
ansible.builtin.git:
repo: "https://github.com/containers/skopeo.git"
dest: "{{ ansible_env.HOME }}/go/src/github.com/containers/skopeo"
- name: build skopeo-HEAD
command: gmake
args:
chdir: "{{ ansible_env.HOME }}/go/src/github.com/containers/skopeo"
creates: "{{ ansible_env.HOME }}/go/src/github.com/containers/skopeo/bin/skopeo"
- name: install skopeo-HEAD
become: yes
become_user: root
become_method: sudo
command: gmake install
args:
chdir: "{{ ansible_env.HOME }}/go/src/github.com/containers/skopeo/"
creates: "/usr/local/bin/skopeo"
- name: install umoci-HEAD
command: go install github.com/opencontainers/umoci/cmd/umoci@latest
args:
creates: "{{ ansible_env.HOME }}/go/bin/umoci"
- name: clone runj
when: ansible_facts['system']|lower == "freebsd"
ansible.builtin.git:
repo: "git@github.com:samuelkarp/runj.git"
dest: "{{ ansible_env.HOME }}/go/src/github.com/samuelkarp/runj"
- name: build runj
when: ansible_facts['system']|lower == "freebsd"
command: make
args:
chdir: "{{ ansible_env.HOME }}/go/src/github.com/samuelkarp/runj"
creates: "{{ ansible_env.HOME }}/go/src/github.com/samuelkarp/runj/bin/runj"
- name: install runj
become: yes
become_user: root
become_method: sudo
when: ansible_facts['system']|lower == "freebsd"
command: make install
args:
chdir: "{{ ansible_env.HOME }}/go/src/github.com/samuelkarp/runj"
creates: "/usr/local/bin/runj"