X-Git-Url: http://git.squeep.com/?p=awsible;a=blobdiff_plain;f=roles%2Fcommon%2Ftasks%2Fmain.yml;h=c65548d7bc1118671d3576bf0659235ab94c6f37;hp=b92b5174c4aec46dd83c560563221b396dbacd2f;hb=933c48ff1e134168de3aaa2d20e4d43c13d04928;hpb=e508dbef1fbcebb59d2e35fb0c5acc65a0186fae diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index b92b517..c65548d 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -1,28 +1,24 @@ --- -- include: volumes.yml - -- name: Create local asset directory - when: ASSET_PATH is defined - file: - state: directory - path: "{{ ASSET_PATH }}" - mode: "0755" - owner: root - group: root +- name: Uninstall outdated python packages + with_items: + - aws-cli + - python27-botocore + - python27-boto + yum: + package: "{{ item }}" + state: absent -- name: PIP prerequisites +- name: Install new python packages with_items: + - awscli - boto - boto3 - - httplib2 - - requests pip: name: "{{ item }}" state: latest - name: Common packages with_items: - - aws-cli - cowsay - figlet - ipsec-tools @@ -46,7 +42,7 @@ group: root - name: Install any facts. - with_items: "{{ fact_scripts|default(None) }}" + with_items: "{{ fact_scripts|default([]) }}" copy: dest: /etc/ansible/facts.d/{{ item }}.fact src: "{{ item }}.fact" @@ -67,6 +63,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 @@ -90,9 +87,9 @@ command: /usr/sbin/update-motd - name: profile stuff - copy: + template: dest: /etc/profile.d/awsible.sh - src: awsible.sh + src: awsible.sh.j2 mode: "0644" owner: root group: root