diff --git a/ansible/roles/install/tasks/centos.yml b/ansible/roles/install/tasks/centos.yml index 566c9cebf..93afa43fc 100644 --- a/ansible/roles/install/tasks/centos.yml +++ b/ansible/roles/install/tasks/centos.yml @@ -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 + diff --git a/ansible/roles/install/tasks/debian.yml b/ansible/roles/install/tasks/debian.yml index d003d14aa..200ca3905 100644 --- a/ansible/roles/install/tasks/debian.yml +++ b/ansible/roles/install/tasks/debian.yml @@ -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" + diff --git a/ansible/roles/tomlconfig/tasks/centos.yml b/ansible/roles/tomlconfig/tasks/centos.yml deleted file mode 100644 index f276e796d..000000000 --- a/ansible/roles/tomlconfig/tasks/centos.yml +++ /dev/null @@ -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 - diff --git a/ansible/roles/tomlconfig/tasks/debian.yml b/ansible/roles/tomlconfig/tasks/debian.yml deleted file mode 100644 index f5e287deb..000000000 --- a/ansible/roles/tomlconfig/tasks/debian.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- - -- name: Install package on Debian/Ubuntu - when: ansible_os_family == "Debian" - apt: "pkg=python-toml state=latest" - diff --git a/ansible/roles/tomlconfig/tasks/main.yml b/ansible/roles/tomlconfig/tasks/main.yml index 06132b14a..acc24dfcd 100644 --- a/ansible/roles/tomlconfig/tasks/main.yml +++ b/ansible/roles/tomlconfig/tasks/main.yml @@ -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}}'"