Merge pull request #147 from Mirantis/yml_to_yaml

yml to yaml
This commit is contained in:
CGenie 2015-09-15 13:56:35 +02:00
commit 47adbe2bf4
102 changed files with 47 additions and 45 deletions

View File

@ -242,7 +242,7 @@ functional way, and in particular avoid `for` loops. Here's an example:
```python
from solar import template
nodes = template.nodes_from('templates/riak_nodes.yml')
nodes = template.nodes_from('templates/riak_nodes.yaml')
riak_services = nodes.on_each(
'resources/riak_node',

14
Vagrantfile vendored
View File

@ -20,9 +20,9 @@ require 'yaml'
VAGRANTFILE_API_VERSION = "2"
# configs, custom updates _defaults
defaults_cfg = YAML.load_file('vagrant-settings.yml_defaults')
if File.exist?('vagrant-settings.yml')
custom_cfg = YAML.load_file('vagrant-settings.yml')
defaults_cfg = YAML.load_file('vagrant-settings.yaml_defaults')
if File.exist?('vagrant-settings.yaml')
custom_cfg = YAML.load_file('vagrant-settings.yaml')
cfg = defaults_cfg.merge(custom_cfg)
else
cfg = defaults_cfg
@ -36,13 +36,13 @@ def ansible_playbook_command(filename, args=[])
"ansible-playbook -v -i \"localhost,\" -c local /vagrant/bootstrap/playbooks/#{filename} #{args.join ' '}"
end
solar_script = ansible_playbook_command("solar.yml")
solar_script = ansible_playbook_command("solar.yaml")
slave_script = ansible_playbook_command("custom-configs.yml", ["-e", "master_ip=10.0.0.2"])
slave_script = ansible_playbook_command("custom-configs.yaml", ["-e", "master_ip=10.0.0.2"])
master_celery = ansible_playbook_command("celery.yml", ["--skip-tags", "slave"])
master_celery = ansible_playbook_command("celery.yaml", ["--skip-tags", "slave"])
slave_celery = ansible_playbook_command("celery.yml", ["--skip-tags", "master"])
slave_celery = ansible_playbook_command("celery.yaml", ["--skip-tags", "master"])
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

View File

@ -0,0 +1,11 @@
---
- name: Main build script
hosts: all
sudo: yes
tasks:
- include: tasks/base.yaml
- include: tasks/puppet.yaml
- include: tasks/docker.yaml
#- include: celery.yaml tags=['master'] celery_dir=/var/run/celery
- include: tasks/cloud_archive.yaml

View File

@ -1,11 +0,0 @@
---
- name: Main build script
hosts: all
sudo: yes
tasks:
- include: tasks/base.yml
- include: tasks/puppet.yml
- include: tasks/docker.yml
#- include: celery.yml tags=['master'] celery_dir=/var/run/celery
- include: tasks/cloud_archive.yml

View File

@ -39,7 +39,7 @@
}, {
"type": "ansible-local",
"playbook_dir": "playbooks",
"playbook_file": "playbooks/build-main.yml",
"playbook_file": "playbooks/build-main.yaml",
"extra_arguments": ["--verbose"]
}],
"post-processors": [{

View File

@ -47,8 +47,8 @@ def deploy():
db.clear()
signals.Connections.clear()
node1 = vr.create('nodes', 'templates/nodes.yml', {})[0]
seed = vr.create('nodes', 'templates/seed_node.yml', {})[0]
node1 = vr.create('nodes', 'templates/nodes.yaml', {})[0]
seed = vr.create('nodes', 'templates/seed_node.yaml', {})[0]
ssh_key = vr.create('ssh_key1', 'resources/ssh_key', {
'keys_dir': '/vagrant/.ssh',

View File

@ -54,7 +54,7 @@ def setup_resources():
if PROFILE:
pr.enable()
node1, node2 = vr.create('nodes', 'templates/nodes.yml', {})
node1, node2 = vr.create('nodes', 'templates/nodes.yaml', {})
# MARIADB
mariadb_service1 = vr.create('mariadb_service1', 'resources/mariadb_service', {

View File

@ -14,7 +14,7 @@ signals.Connections.clear()
from solar import template
nodes = template.nodes_from('templates/riak_nodes.yml')
nodes = template.nodes_from('templates/riak_nodes.yaml')
riak_services = nodes.on_each(
'resources/riak_node',

View File

@ -27,7 +27,7 @@ db = get_db()
def setup_riak():
db.clear()
nodes = vr.create('nodes', 'templates/riak_nodes.yml', {})
nodes = vr.create('nodes', 'templates/riak_nodes.yaml', {})
node1, node2, node3 = nodes
riak_services = []

View File

@ -2,8 +2,8 @@ id: mariadb_db
handler: ansible
version: 1.0.0
actions:
run: run.yml
remove: remove.yml
run: run.yaml
remove: remove.yaml
input:
db_name:
schema: str!

View File

@ -2,8 +2,8 @@ id: mariadb_user
handler: ansible
version: 1.0.0
actions:
run: run.yml
remove: remove.yml
run: run.yaml
remove: remove.yaml
input:
user_password:
schema: str!

View File

@ -2,7 +2,7 @@ id: riak_join_single
handler: ansible
version: 1.0.0
actions:
join: actions/join.yml
join: actions/join.yaml
input:
join_to:
schema: str!

View File

@ -2,9 +2,9 @@ id: riak_node
handler: ansible
version: 1.0.0
actions:
commit: actions/commit.yml
run: actions/run.yml
join: actions/join.yml
commit: actions/commit.yaml
run: actions/run.yaml
join: actions/join.yaml
input:
ip:
schema: str!

View File

@ -5,7 +5,7 @@
sudo: yes
tasks:
- script: /vagrant/bootstrap/playbooks/files/ubuntu-ansible.sh
#- include: celery.yml tags=['master'] celery_dir=/var/run/celery
- include: /vagrant/bootstrap/playbooks/build-main.yml
- include: /vagrant/bootstrap/playbooks/custom-configs.yml master_ip={{ master_ip }}
- include: /vagrant/bootstrap/playbooks/celery.yml tags=slave
#- include: celery.yaml tags=['master'] celery_dir=/var/run/celery
- include: /vagrant/bootstrap/playbooks/build-main.yaml
- include: /vagrant/bootstrap/playbooks/custom-configs.yaml master_ip={{ master_ip }}
- include: /vagrant/bootstrap/playbooks/celery.yaml tags=slave

View File

@ -63,7 +63,7 @@ def riak_plan():
riak_path = os.path.join(
os.path.dirname(os.path.realpath(__file__)),
'orch_fixtures',
'riak.yml')
'riak.yaml')
return graph.create_plan(riak_path, save=False)

View File

@ -70,7 +70,7 @@ def seq_plan():
seq_path = os.path.join(
os.path.dirname(os.path.realpath(__file__)),
'orch_fixtures',
'sequential.yml')
'sequential.yaml')
return graph.create_plan(seq_path, save=False)

View File

@ -80,7 +80,7 @@ def ext_encoder(fpath):
ext = os.path.splitext(os.path.basename(fpath))[1].strip('.')
if ext in ['json']:
return json
elif ext in ['yaml', 'yml']:
elif ext in ['yaml', 'yaml']:
return yaml
raise Exception('Unknown extension {}'.format(ext))

View File

@ -19,7 +19,7 @@ resources:
ssh_key: '{{ssh_key}}'
- id: keystone_base
from: templates/keystone_base.yml
from: templates/keystone_base.yaml
values:
login_user: root
login_password: 'mariadb_service::root_password'
@ -33,7 +33,7 @@ resources:
ssh_key: '{{ssh_key}}'
- id: keystone_api_1
from: templates/keystone_api.yml
from: templates/keystone_api.yaml
values:
idx: 1
db_password: 'keystone_db_user::user_password'
@ -49,7 +49,7 @@ resources:
ssh_key: '{{ssh_key}}'
- id: openstack_base
from: templates/openstack_base.yml
from: templates/openstack_base.yaml
values:
ip: '{{ip}}'
ssh_user: '{{ssh_user}}'

View File

@ -2,7 +2,7 @@ id: glance_{{idx}}
resources:
- id: glance_base_{{ idx }}
from: templates/glance_db.yml
from: templates/glance_db.yaml
values:
idx: '{{ idx }}'

Some files were not shown because too many files have changed in this diff Show More