Pārlūkot izejas kodu

Add lxc ansible tasks

pull/15/head
10sr pirms 9 gadiem
vecāks
revīzija
64bf32dc16
5 mainītis faili ar 14 papildinājumiem un 17 dzēšanām
  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 Parādīt failu

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

+ 0
- 17
ansible/local.sh Parādīt failu

@@ -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 Parādīt failu

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

+ 3
- 0
ansible/roles/lxc/tasks/archlinux.yml Parādīt failu

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

+ 2
- 0
ansible/roles/lxc/tasks/main.yml Parādīt failu

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

Notiek ielāde…
Atcelt
Saglabāt