X-Git-Url: http://git.squeep.com/?p=awsible;a=blobdiff_plain;f=roles%2Fcommon%2Ftasks%2Fmain.yml;h=c65548d7bc1118671d3576bf0659235ab94c6f37;hp=1cbf04470d9807b6e5eec5be32c12b3018455672;hb=933c48ff1e134168de3aaa2d20e4d43c13d04928;hpb=959f205e82efbae0d89d1c34e29fb34b3b15afa6 diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 1cbf044..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 @@ -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