X-Git-Url: http://git.squeep.com/?p=awsible;a=blobdiff_plain;f=roles%2Fcommon%2Ftasks%2Fmain.yml;h=c65548d7bc1118671d3576bf0659235ab94c6f37;hp=02f3b0ad88681c70a0b3d853fa046b060d636a65;hb=933c48ff1e134168de3aaa2d20e4d43c13d04928;hpb=164fb4ac7aebf84ca89433aeee8d16771fb8b7da diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 02f3b0a..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,10 +42,10 @@ 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 + src: "{{ item }}.fact" mode: "0755" owner: root group: root @@ -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