X-Git-Url: http://git.squeep.com/?p=awsible;a=blobdiff_plain;f=roles%2Fcommon%2Ftasks%2Fmain.yml;h=12c6ff1637fda0e0082a4a2d514c512c70923675;hp=1cbf04470d9807b6e5eec5be32c12b3018455672;hb=3e9071903ac30cc306ccd34372087c6492106e57;hpb=b14314a19105a8a67a6193122697c1c1f6ab43ba diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 1cbf044..12c6ff1 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -1,5 +1,10 @@ --- +- name: bootstrap /data + stat: + path: /data + register: datadir - include: volumes.yml + when: not datadir.stat.exists - name: Create local asset directory when: ASSET_PATH is defined @@ -10,19 +15,26 @@ owner: root group: root -- name: PIP prerequisites +- name: Uninstall outdated python packages with_items: + - aws-cli + - python27-botocore + - python27-boto + yum: + package: "{{ item }}" + state: absent + +- name: Install new python packages + with_items: + - awscli - boto - boto3 - - httplib2 - - requests pip: name: "{{ item }}" - state: latest + state: present - name: Common packages with_items: - - aws-cli - cowsay - figlet - ipsec-tools @@ -67,6 +79,7 @@ state: list region: "{{ ansible_ec2_placement_region }}" resource: "{{ ansible_ec2_instance_id }}" + register: my_tags - name: Name instance from ID and ASG module when: my_tags['tags']['aws:autoscaling:groupName'] is defined