From 3947d129f2862ce2466f734a901620e095019987 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 12 Jun 2014 20:15:37 +0000 Subject: [PATCH] Change all the old first_available_file to with_first_found --- callback_plugins/logdetail.py | 2 +- roles/base/tasks/main.yml | 10 +++++----- roles/fas_client/tasks/main.yml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/callback_plugins/logdetail.py b/callback_plugins/logdetail.py index 158b8ee45c..cbf40b7356 100644 --- a/callback_plugins/logdetail.py +++ b/callback_plugins/logdetail.py @@ -92,7 +92,7 @@ class LogMech(object): res['task_args'] = task.module_args if self.playbook_id == 'ansible-cmd': res['task_userid'] = getlogin() - for k in ("delegate_to", "environment", "first_available_file", + for k in ("delegate_to", "environment", "with_first_found", "local_action", "notified_by", "notify", "register", "sudo", "sudo_user", "tags", "transport", "when"): diff --git a/roles/base/tasks/main.yml b/roles/base/tasks/main.yml index 7e7c3b6a1a..4c5f28f72e 100644 --- a/roles/base/tasks/main.yml +++ b/roles/base/tasks/main.yml @@ -14,7 +14,7 @@ - name: sshd_config copy: src={{ item }} dest=/etc/ssh/sshd_config mode=600 - first_available_file: + with_first_found: - "{{ sshd_config }}" - ssh/sshd_config.{{ ansible_fqdn }} - ssh/sshd_config.{{ host_group }} @@ -87,7 +87,7 @@ - name: iptables template: src={{ item }} dest=/etc/sysconfig/iptables mode=600 backup=yes - first_available_file: + with_first_found: - "{{ iptables }}" - iptables/iptables.{{ ansible_fqdn }} - iptables/iptables.{{ host_group }} @@ -103,7 +103,7 @@ # XXX fixme # a datacenter 'fact' from setup - name: /etc/resolv.conf copy: src={{ item }} dest=/etc/resolv.conf - first_available_file: + with_first_found: - "{{ resolvconf }}" - resolv.conf/{{ ansible_fqdn }} - resolv.conf/{{ host_group }} @@ -116,7 +116,7 @@ - name: rsyslog.conf copy: src={{ item }} dest=/etc/rsyslog.conf mode=644 - first_available_file: + with_first_found: - rsyslog/rsyslog.conf.{{ dist_tag }} - rsyslog/rsyslog.conf.default @@ -156,7 +156,7 @@ - name: /etc/postfix/main.cf copy: src={{ item }} dest=/etc/postfix/main.cf - first_available_file: + with_first_found: - "{{ postfix_maincf }}" - "postfix/main.cf/main.cf.{{ ansible_fqdn }}" - "postfix/main.cf/main.cf.{{ host_group }}" diff --git a/roles/fas_client/tasks/main.yml b/roles/fas_client/tasks/main.yml index 0357a6c9ee..2e95b031ab 100644 --- a/roles/fas_client/tasks/main.yml +++ b/roles/fas_client/tasks/main.yml @@ -45,7 +45,7 @@ # - name: setup /etc/fas.conf for client use template: src={{ item }} dest=/etc/fas.conf owner=root mode=600 - first_available_file: + with_first_found: - "{{ ansible_fqdn }}.fas.conf.j2" - "{{ ansible_hostname }}.fas.conf.j2" - "{{ ansible_hostname }}.fas.conf.j2"