Add runc role
This commit is contained in:
parent
2b4280e540
commit
f7d3e64941
5 changed files with 92 additions and 0 deletions
|
@ -23,6 +23,7 @@
|
|||
- virtualbox
|
||||
- virtualenvwrapper
|
||||
- fonts
|
||||
- runc
|
||||
tags:
|
||||
- packages
|
||||
|
||||
|
|
13
roles/runc/.yamllint
Normal file
13
roles/runc/.yamllint
Normal file
|
@ -0,0 +1,13 @@
|
|||
extends: default
|
||||
|
||||
rules:
|
||||
braces:
|
||||
max-spaces-inside: 1
|
||||
level: error
|
||||
brackets:
|
||||
max-spaces-inside: 1
|
||||
level: error
|
||||
line-length: disable
|
||||
# NOTE(retr0h): Templates no longer fail this lint rule.
|
||||
# Uncomment if running old Molecule templates.
|
||||
# truthy: disable
|
38
roles/runc/README.md
Normal file
38
roles/runc/README.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
Role Name
|
||||
=========
|
||||
|
||||
A brief description of the role goes here.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
|
||||
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
|
||||
|
||||
Example Playbook
|
||||
----------------
|
||||
|
||||
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
|
||||
|
||||
- hosts: servers
|
||||
roles:
|
||||
- { role: username.rolename, x: 42 }
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
BSD
|
||||
|
||||
Author Information
|
||||
------------------
|
||||
|
||||
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
|
4
roles/runc/defaults/main.yml
Normal file
4
roles/runc/defaults/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
# defaults file for runc
|
||||
install_dir: ~/Instalados/
|
||||
runc_version: v0.1.1
|
36
roles/runc/tasks/main.yml
Normal file
36
roles/runc/tasks/main.yml
Normal file
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
# tasks file for runc
|
||||
- name: Install seccomp and git
|
||||
become: yes
|
||||
apt:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
with_items:
|
||||
- git
|
||||
- libseccomp-dev
|
||||
|
||||
- name: Clone runc repository
|
||||
git:
|
||||
repo: "https://github.com/opencontainers/runc"
|
||||
dest: "{{ install_dir }}/runc/"
|
||||
version: "{{ runc_version }}"
|
||||
register: cloned
|
||||
|
||||
- name: Compile runc
|
||||
command: make
|
||||
args:
|
||||
chdir: "{{ install_dir }}/runc/"
|
||||
environment:
|
||||
GOPATH: "{{ go_path }}"
|
||||
when: cloned.changed
|
||||
tags:
|
||||
- skip_ansible_lint
|
||||
|
||||
- name: Install runc
|
||||
become: yes
|
||||
command: make install
|
||||
args:
|
||||
chdir: "{{ install_dir }}/runc/"
|
||||
when: cloned.changed
|
||||
tags:
|
||||
- skip_ansible_lint
|
Loading…
Reference in a new issue