Skip to content
Snippets Groups Projects
Commit 8395cc60 authored by nimrod's avatar nimrod
Browse files

- Commented out template package (haven't uploaded a new version to PyPI

yet).
- Run apt, pip and pip3 installation with a joined list (a little faster
than a with_items loop).
- added changed_when to go get and cargo install.
parent 71ff3b65
No related branches found
No related tags found
No related merge requests found
...@@ -169,7 +169,7 @@ ...@@ -169,7 +169,7 @@
- proselint - proselint
- selenium - selenium
- sh - sh
- template #- template
- tox - tox
- twine - twine
- yapf - yapf
...@@ -183,12 +183,11 @@ ...@@ -183,12 +183,11 @@
- ansible_pkg_mgr == 'apt' - ansible_pkg_mgr == 'apt'
- name: apt install - name: apt install
with_items: '{{ apt }}'
when: apt is iterable when: apt is iterable
become: yes become: yes
become_user: root become_user: root
apt: apt:
name: '{{ item }}' name: '{{ apt }}'
state: present state: present
purge: yes purge: yes
force: yes force: yes
...@@ -198,6 +197,8 @@ ...@@ -198,6 +197,8 @@
- name: go get - name: go get
when: go is iterable when: go is iterable
command: 'go get -u {{ go|join(" ") }}' command: 'go get -u {{ go|join(" ") }}'
register: go_get
changed_when: "'get' in go_get"
- name: gem install - name: gem install
with_items: '{{ gem }}' with_items: '{{ gem }}'
...@@ -207,6 +208,7 @@ ...@@ -207,6 +208,7 @@
gem: gem:
name: '{{ item }}' name: '{{ item }}'
state: present state: present
include_dependencies: yes
- name: npm install - name: npm install
with_items: '{{ npm }}' with_items: '{{ npm }}'
...@@ -219,21 +221,19 @@ ...@@ -219,21 +221,19 @@
state: present state: present
- name: pip install - name: pip install
with_items: '{{ pip }}'
when: pip is iterable when: pip is iterable
become: yes become: yes
become_user: root become_user: root
pip: pip:
name: '{{ item }}' name: '{{ pip }}'
state: present state: present
- name: pip3 install - name: pip3 install
with_items: '{{ pip3 }}'
when: pip3 is iterable when: pip3 is iterable
become: yes become: yes
become_user: root become_user: root
pip: pip:
name: '{{ item }}' name: '{{ pip3 }}'
state: present state: present
executable: pip3 executable: pip3
...@@ -241,3 +241,6 @@ ...@@ -241,3 +241,6 @@
when: cargo is iterable when: cargo is iterable
become: no become: no
command: '/usr/bin/cargo install {{ cargo|join(" ") }}' command: '/usr/bin/cargo install {{ cargo|join(" ") }}'
register: cargo_install
failed_when: cargo_install.rc > 0 and not 'already exists in destination' in cargo_install.stderr
changed_when: cargo_install.rc == 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment