Reorganized package installations in Ansible to make tomlconfig faster

This commit is contained in:
Greg Szabo
2017-09-15 11:42:23 -04:00
parent 4f47a762a0
commit e8d2c0b0db
5 changed files with 23 additions and 29 deletions
+17
View File
@@ -32,3 +32,20 @@
when: ansible_os_family == "RedHat"
yum: "pkg={{service}} update_cache=yes state=latest"
# The below commands are required so that the tomlconfig playbook can run.
- name: Install epel-release on CentOS/RedHat
when: ansible_os_family == "RedHat"
yum: "pkg=epel-release update_cache=yes state=latest"
- name: Install pip on CentOS/RedHat
when: ansible_os_family == "RedHat"
yum: "pkg={{item}} state=latest"
with_items:
- python2-pip
- python-virtualenv
- name: Install toml
when: ansible_os_family == "RedHat"
pip: name=toml
+6
View File
@@ -20,3 +20,9 @@
when: ansible_os_family == "Debian"
apt: "pkg={{service}} update_cache=yes state=latest"
# The below command is required to use the tomlconfig playbook.
- name: Install package on Debian/Ubuntu
when: ansible_os_family == "Debian"
apt: "pkg=python-toml state=latest"
-17
View File
@@ -1,17 +0,0 @@
---
- name: Install epel-release on CentOS/RedHat
when: ansible_os_family == "RedHat"
yum: "pkg=epel-release update_cache=yes state=latest"
- name: Install pip on CentOS/RedHat
when: ansible_os_family == "RedHat"
yum: "pkg={{item}} state=latest"
with_items:
- python2-pip
- python-virtualenv
- name: Install toml
when: ansible_os_family == "RedHat"
pip: name=toml
@@ -1,6 +0,0 @@
---
- name: Install package on Debian/Ubuntu
when: ansible_os_family == "Debian"
apt: "pkg=python-toml state=latest"
-6
View File
@@ -1,11 +1,5 @@
---
- include: debian.yml
when: ansible_os_family == "Debian"
- include: centos.yml
when: ansible_os_family == "RedHat"
- name: Update config.toml with json
when: jsonconfig is defined
tomlconfig: "dest=/etc/{{service}}/tendermint/config.toml json='{{jsonconfig}}'"