| --- |
| - hosts: '{{ hosts }}' |
| |
| tasks: |
| - name: Install needed Python libraries |
| become: yes |
| pip: |
| name: '{{ item }}' |
| state: present |
| with_items: |
| - urllib3 |
| - pyopenssl |
| - ndg-httpsclient |
| - pyasn1 |
| |
| - name: Download OS package manager configuration script |
| become: yes |
| get_url: |
| url: https://rpm.nodesource.com/setup_6.x |
| dest: /tmp/setup_node.sh |
| mode: 0700 |
| |
| - name: Configure OS package manager |
| become: yes |
| shell: "/tmp/setup_node.sh" |
| |
| - name: Install OS packages |
| become: yes |
| yum: |
| name: '{{ item }}' |
| state: present |
| with_items: |
| - nodejs |
| - gcc-c++ |
| - make |
| |
| - name: Install edgemicro |
| become: yes |
| npm: |
| name: '{{ item }}' |
| global: yes |
| state: present |
| with_items: |
| - edgemicro |
| |
| - name: Create edgemicro default configuration |
| shell: 'edgemicro init' |
| |