Packer.io: add juno packages, fix for ansible cfg and logging
This commit is contained in:
parent
e7fc69669d
commit
083be2d91a
2
bootstrap/ansible.cfg
Normal file
2
bootstrap/ansible.cfg
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[defaults]
|
||||||
|
host_key_checking = False
|
@ -9,3 +9,4 @@
|
|||||||
- include: tasks/docker.yml
|
- include: tasks/docker.yml
|
||||||
#- include: celery.yml tags=['master'] celery_dir=/var/run/celery
|
#- include: celery.yml tags=['master'] celery_dir=/var/run/celery
|
||||||
- include: tasks/cinder.yml
|
- include: tasks/cinder.yml
|
||||||
|
- include: tasks/cloud_archive.yml
|
||||||
|
5
bootstrap/playbooks/tasks/cloud_archive.yml
Normal file
5
bootstrap/playbooks/tasks/cloud_archive.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- shell: add-apt-repository -y cloud-archive:juno
|
||||||
|
|
||||||
|
- shell: apt-get update || apt-get update --fix-missing
|
@ -1,4 +1,9 @@
|
|||||||
{
|
{
|
||||||
|
"variables": {
|
||||||
|
"ansible_config_path": "/etc/ansible",
|
||||||
|
"ansible_config_file": "ansible.cfg",
|
||||||
|
"ansible_log_file": "/tmp/ansible.log"
|
||||||
|
},
|
||||||
"builders": [{
|
"builders": [{
|
||||||
"type": "virtualbox-ovf",
|
"type": "virtualbox-ovf",
|
||||||
"source_path": "trusty64/box.ovf",
|
"source_path": "trusty64/box.ovf",
|
||||||
@ -7,6 +12,25 @@
|
|||||||
"shutdown_command": "echo 'vagrant' | sudo -S shutdown -P now"
|
"shutdown_command": "echo 'vagrant' | sudo -S shutdown -P now"
|
||||||
}],
|
}],
|
||||||
"provisioners": [
|
"provisioners": [
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"inline": ["sudo mkdir -p {{ user `ansible_config_path` }}"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "file",
|
||||||
|
"source": "ansible.cfg",
|
||||||
|
"destination": "/tmp/ansible.cfg"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"inline": ["sudo mv /tmp/ansible.cfg {{ user `ansible_config_path` }}/{{ user `ansible_config_file` }}"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"inline": [
|
||||||
|
"sudo echo 'log_path = {{ user `ansible_log_file` }}' >> {{ user `ansible_config_path` }}/{{ user `ansible_config_file` }}"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"script": "playbooks/files/ubuntu-ansible.sh"
|
"script": "playbooks/files/ubuntu-ansible.sh"
|
||||||
|
Loading…
Reference in New Issue
Block a user