Explorar el Código

Add lxc ansible tasks

pull/15/head
10sr hace 9 años
padre
commit
64bf32dc16
Se han modificado 5 ficheros con 14 adiciones y 17 borrados
  1. +5
    -0
      ansible/ansible.cfg
  2. +0
    -17
      ansible/local.sh
  3. +4
    -0
      ansible/lxc.yml
  4. +3
    -0
      ansible/roles/lxc/tasks/archlinux.yml
  5. +2
    -0
      ansible/roles/lxc/tasks/main.yml

+ 5
- 0
ansible/ansible.cfg Ver fichero

@@ -0,0 +1,5 @@
[defaults]
hostfile=local.hosts
nocows=1
[privilege_escalation]
become_ask_pass=True

+ 0
- 17
ansible/local.sh Ver fichero

@@ -1,17 +0,0 @@
#!/bin/sh
set -e

if ! command -v ansible-playbook >/dev/null
then
echo 'Command not found: ansible-playbook'
echo 'Install ansible first.'
exit 1
fi

if test $# -eq 0
then
echo "usage: $0 <playbook> [...]"
exit 1
fi

ansible-playbook -i local.hosts --ask-sudo-pass "$@"

+ 4
- 0
ansible/lxc.yml Ver fichero

@@ -0,0 +1,4 @@
---
- hosts: all
roles:
- lxc

+ 3
- 0
ansible/roles/lxc/tasks/archlinux.yml Ver fichero

@@ -0,0 +1,3 @@
- name: Install LXC
pacman: name=lxc state=present
become: yes

+ 2
- 0
ansible/roles/lxc/tasks/main.yml Ver fichero

@@ -0,0 +1,2 @@
- include: archlinux.yml
when: ansible_os_family == "Archlinux"

Cargando…
Cancelar
Guardar