Repository :
http://git.fedorahosted.org/cgit/copr.git
On branch : master
---------------------------------------------------------------
commit 44acd06ab4ed55e9a8a8181794292de3d96c9c1e
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Dec 10 22:45:28 2013 +0100
use newstyle ansible variables
addressing:
[DEPRECATION WARNING]: Legacy variable substitution, such as using ${foo} or
$foo instead of {{ foo }} is currently valid but will be phased out and has
been out of favor since version 1.2. This is the last of legacy features on our
deprecation list. You may continue to use this if you have specific needs for
now. This feature will be removed in version 1.6. Deprecation warnings can be
disabled by setting deprecation_warnings=False in ansible.cfg.
---------------------------------------------------------------
playbooks/builderpb.yml | 16 ++++++++--------
playbooks/terminatepb.yml | 2 +-
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/playbooks/builderpb.yml b/playbooks/builderpb.yml
index 5c1ed2e..67b3470 100644
--- a/playbooks/builderpb.yml
+++ b/playbooks/builderpb.yml
@@ -12,18 +12,18 @@
tasks:
- name: spin it up
- local_action: ec2 keypair=${keypair} image=${image} type=${instance_type} wait=true
group=${security_group}
+ local_action: ec2 keypair={{ keypair }} image={{ image }} type={{ instance_type }}
wait=true group={{ security_group }}
register: inst_res
- name: get its internal ip b/c openstack is sometimes stupid
- local_action: shell euca-describe-instances ${inst_res.instances[0].id} | grep
INSTANCE | cut -f 18
+ local_action: shell euca-describe-instances {{ inst_res.instances[0].id }} | grep
INSTANCE | cut -f 18
register: int_ip
- name: add it to the special group
- local_action: add_host hostname=${int_ip.stdout} groupname=builder_temp_group
+ local_action: add_host hostname={{ int_ip.stdout }} groupname=builder_temp_group
- name: wait for the host to be hot
- local_action: wait_for host=${int_ip.stdout} port=22 delay=5 timeout=600
+ local_action: wait_for host={{ int_ip.stdout }} port=22 delay=5 timeout=600
- debug: msg="IP={{ int_ip.stdout }}"
@@ -38,13 +38,13 @@
action: shell hostname `curl -s
http://169.254.169.254/2009-04-04/meta-data/instance-id`
- name: add repos
- action: copy src=$files/$item dest=/etc/yum.repos.d/$item
+ action: copy src={{ files }}/{{ item }} dest=/etc/yum.repos.d/{{ item }}
with_items:
- builder.repo
- epel6.repo
- name: install pkgs
- action: yum state=present pkg=$item
+ action: yum state=present pkg={{ item }}
with_items:
- mock
- createrepo
@@ -62,10 +62,10 @@
action: file state=directory path=/home/mockbuilder/.ssh mode=0700 owner=mockbuilder
group=mockbuilder
- name: mockbuilder authorized_keys
- action: authorized_key user=mockbuilder key='$FILE(${files}/buildsys.pub)'
+ action: authorized_key user=mockbuilder key='$FILE({{ files
}}/buildsys.pub)'
- name: put updated mock configs into /etc/mock
- action: copy src=$files/mock/$item dest=/etc/mock
+ action: copy src={{ files }}/mock/{{ item }} dest=/etc/mock
with_items:
- site-defaults.cfg
- epel-5-x86_64.cfg
diff --git a/playbooks/terminatepb.yml b/playbooks/terminatepb.yml
index a95f810..ea61bad 100644
--- a/playbooks/terminatepb.yml
+++ b/playbooks/terminatepb.yml
@@ -10,7 +10,7 @@
register: instanceid
- name: terminate it
- local_action: command euca-terminate-instances ${instanceid.stdout}
+ local_action: command euca-terminate-instances {{ instanceid.stdout }}