Commit cfd58e1f by John Eskew

Fix with_items

parent 3debac48
......@@ -3,13 +3,13 @@
fail:
msg: "Configuration Sources Checking (COMMON_EXTRA_CONFIGURATION_SOURCES_CHECKING) is enabled, you must define {{ item }}"
when: COMMON_EXTRA_CONFIGURATION_SOURCES_CHECKING and ({{ item }} is not defined or {{ item }} != True)
with_items: COMMON_EXTRA_CONFIGURATION_SOURCES
with_items: "{{ COMMON_EXTRA_CONFIGURATION_SOURCES }}"
tags:
- "install"
- "install:configuration"
# ubuntu
- stat:
- stat:
path: "/usr/sbin/update-ca-certificates"
register: update_ca_certificates
......@@ -78,7 +78,7 @@
apt:
name: "{{ item }}"
install_recommends: yes
state: present
state: present
update_cache: yes
with_items: "{{ common_debian_pkgs }}"
when: ansible_distribution in common_debian_variants
......@@ -91,13 +91,13 @@
update_cache: yes
with_items: "{{ common_custom_debian_pkgs }}"
when: >
ansible_distribution in common_debian_variants and
ansible_distribution in common_debian_variants and
ansible_distribution_release in common_custom_ppa_releases
- name: Install role-independent useful system packages
yum:
name: "{{ item }}"
state: present
state: present
update_cache: yes
with_items: "{{ common_redhat_pkgs }}"
when: ansible_distribution in common_redhat_variants
......@@ -106,24 +106,24 @@
- name: Create common directories
file:
path: "{{ item.path }}"
state: "{{ item.state | default('directory') }}"
state: "{{ item.state | default('directory') }}"
owner: "{{ item.owner | default('root') }}"
group: "{{ item.group | default('root') }}"
group: "{{ item.group | default('root') }}"
mode: "0755"
with_items: "{{ common_directories }}"
- name: upload sudo config for key forwarding as root
copy:
src: ssh_key_forward
src: ssh_key_forward
dest: /etc/sudoers.d/ssh_key_forward
validate: 'visudo -c -f %s'
owner: root
group: root
validate: 'visudo -c -f %s'
owner: root
group: root
mode: "0440"
- name: pip install virtualenv
pip:
name: "{{ item }}"
name: "{{ item }}"
state: present
extra_args: "-i {{ COMMON_PYPI_MIRROR_URL }}"
with_items: "{{ common_pip_pkgs }}"
......@@ -131,8 +131,8 @@
- name: update /etc/hosts
template:
src: hosts.j2
template:
src: hosts.j2
dest: /etc/hosts
when: COMMON_HOSTNAME|length > 0
register: etc_hosts
......@@ -152,8 +152,8 @@
template:
dest: "{{ item.dest }}"
src: "{{ item.src }}"
owner: root
group: root
owner: root
group: root
mode: "{{ item.mode | default(0644) }}"
register: config_templates
with_items:
......@@ -165,8 +165,8 @@
# TODO: restarts no matter which template has changed, need to examine
# the results
- name: restart rsyslogd
service:
name: rsyslog
service:
name: rsyslog
state: restarted
become: True
when: config_templates.changed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment