From 38c8cc555310dae426b3bdfba22cc490e8da9ba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Thu, 9 Jan 2014 11:14:29 +0000 Subject: [PATCH] use new ansible syntax 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. --- files/copr/provision/builderpb.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/files/copr/provision/builderpb.yml b/files/copr/provision/builderpb.yml index 4f1f8e8873..fdd3bedee3 100644 --- a/files/copr/provision/builderpb.yml +++ b/files/copr/provision/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 }}" @@ -37,7 +37,7 @@ action: shell hostname `curl -s http://169.254.169.254/2009-04-04/meta-data/instance-id` - name: install pkgs - action: yum state=present pkg=$item + action: yum state=present pkg={{ item }} with_items: - rsync - openssh-clients @@ -45,13 +45,13 @@ - libsemanage-python - 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 additional pkgs - action: yum state=present pkg=$item + action: yum state=present pkg={{ item }} with_items: - mock - createrepo @@ -67,10 +67,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