Browse Source

Reorganized package installations in Ansible to make tomlconfig faster

pull/1943/head
Greg Szabo 7 years ago
parent
commit
e8d2c0b0db
5 changed files with 23 additions and 29 deletions
  1. +17
    -0
      ansible/roles/install/tasks/centos.yml
  2. +6
    -0
      ansible/roles/install/tasks/debian.yml
  3. +0
    -17
      ansible/roles/tomlconfig/tasks/centos.yml
  4. +0
    -6
      ansible/roles/tomlconfig/tasks/debian.yml
  5. +0
    -6
      ansible/roles/tomlconfig/tasks/main.yml

+ 17
- 0
ansible/roles/install/tasks/centos.yml 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
- 0
ansible/roles/install/tasks/debian.yml 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"

+ 0
- 17
ansible/roles/tomlconfig/tasks/centos.yml 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

+ 0
- 6
ansible/roles/tomlconfig/tasks/debian.yml View File

@ -1,6 +0,0 @@
---
- name: Install package on Debian/Ubuntu
when: ansible_os_family == "Debian"
apt: "pkg=python-toml state=latest"

+ 0
- 6
ansible/roles/tomlconfig/tasks/main.yml 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}}'"


Loading…
Cancel
Save