From 940e35da5bb63a1f0efd67838cef9013517140fe Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 6 Aug 2019 21:24:37 +0200 Subject: [PATCH] add extra packages variable --- molecule/ec2-centos-7/playbook.yml | 10 ++-------- requirements.yml | 5 ----- tasks/install.yml | 3 ++- vars/main.yml | 3 +++ 4 files changed, 7 insertions(+), 14 deletions(-) delete mode 100644 requirements.yml create mode 100644 vars/main.yml diff --git a/molecule/ec2-centos-7/playbook.yml b/molecule/ec2-centos-7/playbook.yml index 66b39a8..5608f84 100644 --- a/molecule/ec2-centos-7/playbook.yml +++ b/molecule/ec2-centos-7/playbook.yml @@ -2,15 +2,9 @@ - name: Converge hosts: all vars: - yum_repositories: - epel: - filename: Extra-EPEL - desc: Extra Packages for Enterprise Linux (EPEL) - baseurl: "http://download.fedoraproject.org/pub/epel/$releasever/$basearch/" - gpgkey: "http://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-$releasever/" - enabled: True + mosquitto_packages_extra: + - epel-release mosquitto_bind_address: "127.0.0.1" roles: - - role: xoxys.yum - role: xoxys.mosquitto diff --git a/requirements.yml b/requirements.yml deleted file mode 100644 index 397883f..0000000 --- a/requirements.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- src: https://gitea.rknet.org/ansible/xoxys.yum.git - name: xoxys.yum - scm: git - version: master diff --git a/tasks/install.yml b/tasks/install.yml index dd8cd49..869ec00 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -2,8 +2,9 @@ - block: - name: Install mqtt packages package: - name: mosquitto + name: "{{ item }}" state: present + loop: "{{ mosquitto_packages_extra + __mosquitto_packages }}" - name: Create group '{{ mosquitto_group }}' group: diff --git a/vars/main.yml b/vars/main.yml new file mode 100644 index 0000000..5a4c23b --- /dev/null +++ b/vars/main.yml @@ -0,0 +1,3 @@ +--- +__mosquitto_packages: + - mosquitto