install dbus and cache update cache where needed

Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2018-02-09 09:57:22 -06:00
parent 627d5107cc
commit 5f3a3bafda
No known key found for this signature in database
GPG Key ID: 9443251A787B9FB3
3 changed files with 18 additions and 4 deletions

View File

@ -19,8 +19,18 @@
timeout: 60
listen: check connection
- name: Set local facts for new container(s)
- name: Gather facts for new container(s)
setup:
filter: ansible_local
gather_subset: "!all"
listen: check connection
- name: Ensure dbus is installed
package:
name: "{{ nspawn_dbus_package }}"
state: present
update_cache: "{{ ansible_pkg_mgr in ['apt', 'zypper'] }}"
register: dbus_install
retries: 5
delay: 3
until: dbus_install | success
listen: check connection

View File

@ -23,7 +23,6 @@ nspawn_map:
# the container create process will ensure the file is not present within the
# contianer prior to writting the config.
nspawn_read_only_host_bindmount:
- { source: /etc/resolv.conf, dest: /etc/resolv.conf }
- { source: /etc/environment, dest: /etc/environment }
- { source: /etc/localtime, dest: /etc/localtime }
@ -33,3 +32,6 @@ nspawn_shared_host_bindmount:
- /etc/yum
- /root
- /opt
nspawn_dbus_package:
- dbus

View File

@ -23,7 +23,6 @@ nspawn_map:
# the container create process will ensure the file is not present within the
# contianer prior to writting the config.
nspawn_read_only_host_bindmount:
- { source: /etc/resolv.conf, dest: /etc/resolv.conf }
- { source: /etc/environment, dest: /etc/environment }
- { source: /etc/localtime, dest: /etc/localtime }
@ -33,3 +32,6 @@ nspawn_shared_host_bindmount:
- /etc/apt
- /root
- /opt
nspawn_dbus_package:
- dbus