Advertisement
aironman

my ansible playbooks

Feb 3rd, 2015
242
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. - name: main playbook
  2. hosts: 127.0.0.1
  3. connection: local
  4. sudo: Yes
  5. gather_facts: True
  6. vars_files:
  7. - /home/core/REPO/alonso/core2door-integration/workflows/core2door.ansible/vars-feed.yml
  8. tasks:
  9. - include: tasks/feed-adapter.yml
  10.  
  11. tasks/feed-adapter.yml
  12.  
  13. # This playbook deploys feed-adapter application in this host. This app needs a jar that basically writes to HDFS and write a log in a system,
  14. # actually Impala. Variables are described within vars-feed.yml file.
  15. - name: feed-adapter playbook
  16. hosts: "{{host_feed}}"
  17. remote_user: "{{remote-user}}"
  18. sudo: Yes
  19.  
  20. - name: Creates feed_adapter_outputpath directory
  21. file: path=/var/app/feed-adapter/ state=directory
  22.  
  23. - name: Creates check-feed-adapter-folders_outputpath directory
  24. file: path=/var/app/check-feed-adapter-folders/ state=directory
  25.  
  26. - name: Copy supervisor conf files to /etc/supervisor.d folder
  27. copy: src=/home/core/REPO/alonso/core2door-integration/feed-adapter/feed_adapter_Sip_Pub.conf dest=/etc/supervisor.d/feed_adapter_Sip_Pub.conf owner=root group=root mode=0644
  28.  
  29. - name: Copy generated jar to destination folder
  30. copy: src=/home/core/REPO/alonso/core2door-integration/feed-adapter/target/feed-adapter-0.0.1-SNAPSHOT.jar dest=/var/app/check-feed-adapter-folders/feed-adapter.jar mode=0644
  31.  
  32. - name: Copy necessary .properties files to destination folder
  33. copy: src=/home/core/REPO/alonso/core2door-integration/feed-adapter/feed-adapter-SIP-Pub.properties dest=/var/app/check-feed-adapter-folders/feed-adapter-SIP-Pub.properties mode=0644
  34.  
  35. - name: Copy check-feed-adapter-folders jar to destination folder
  36. copy: src=/home/core/REPO/alonso/core2door-integration/CheckFeedAdapterFolders/target/CheckFeedAdapterFolders-0.0.1-SNAPSHOT.jar dest=/var/app/check-feed-adapter-folders/CheckFeedAdapterFolders.jar mode=0644
  37.  
  38. - name: Copy check.sh script to destination folder
  39. copy: src=/home/core/REPO/alonso/core2door-integration/CheckFeedAdapterFolders/check.sh dest=/var/app/check-feed-adapter-folders/check.sh mode=0644
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement