Skip to content

Commit

Permalink
Ensure packages are installed
Browse files Browse the repository at this point in the history
  • Loading branch information
bigjools committed Feb 1, 2017
1 parent ac74d82 commit c409a7c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 21 deletions.
11 changes: 4 additions & 7 deletions tasks/ironic_conductor_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

- include: ironic_install_apt.yml
- include: ironic_install_packages.yml
static: no
when:
- ansible_pkg_mgr == 'apt'
vars:
apt_pkgs: "{{ ironic_conductor_distro_packages }}"
ironic_pkgs: "{{ ironic_conductor_distro_packages }}"

- include: ironic_install_apt.yml
- include: ironic_install_packages.yml
static: no
when:
- ansible_pkg_mgr == 'apt'
- ironic_standalone
vars:
apt_pkgs: "{{ ironic_conductor_standalone_distro_packages }}"
ironic_pkgs: "{{ ironic_conductor_standalone_distro_packages }}"
24 changes: 12 additions & 12 deletions tasks/ironic_install_apt.yml → tasks/ironic_install_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.

- name: Update apt sources
apt:
update_cache: yes
cache_valid_time: "{{ cache_timeout }}"
register: apt_update
until: apt_update|success
retries: 5
delay: 2
#- name: Update apt sources
# apt:
# update_cache: yes
# cache_valid_time: "{{ cache_timeout }}"
# register: apt_update
# until: apt_update|success
# retries: 5
# delay: 2

- name: Install apt packages
apt:
pkg: "{{ item }}"
- name: Install system packages
package:
name: "{{ item }}"
state: "{{ ironic_package_state }}"
register: install_packages
until: install_packages|success
retries: 5
delay: 2
with_items:
- "{{ apt_pkgs }}"
- "{{ ironic_pkgs }}"
4 changes: 2 additions & 2 deletions vars/redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ ironic_conductor_distro_packages:
# - libpq-dev
# - python-yaml
# - open-iscsi
# - ipmitool
# - tftpd-hpa
- ipmitool
- tftp-server

ironic_conductor_standalone_distro_packages:
# - isc-dhcp-server
Expand Down

0 comments on commit c409a7c

Please sign in to comment.