2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-09 08:30:39 +00:00

chore: update deprecated usages

This commit is contained in:
Gavin D'souza 2019-12-11 10:06:43 +05:30
parent fce86fa896
commit a922d198a2
4 changed files with 26 additions and 9 deletions

View File

@ -14,7 +14,9 @@
when: tmp_bench.stat.exists and not bench_repo_register.stat.exists when: tmp_bench.stat.exists and not bench_repo_register.stat.exists
- name: install bench - name: install bench
pip: name={{ bench_repo_path }} extra_args='-e' pip:
name: '{{ bench_repo_path }}'
extra_args: '-e'
become: yes become: yes
become_user: root become_user: root
@ -25,7 +27,8 @@
when: overwrite when: overwrite
- name: Check whether bench exists - name: Check whether bench exists
stat: path="{{ bench_path }}" stat:
path: "{{ bench_path }}"
register: bench_stat register: bench_stat
- name: Fix permissions - name: Fix permissions

View File

@ -9,7 +9,12 @@
when: ansible_distribution == 'Ubuntu' and ansible_distribution_major_version|int >= 16 when: ansible_distribution == 'Ubuntu' and ansible_distribution_major_version|int >= 16
- name: Add configuration - name: Add configuration
template: src={{ mysql_conf_tpl }} dest={{ mysql_conf_dir[ansible_distribution] }}/{{ mysql_conf_file }} owner=root group=root mode=0644 template:
src: '{{ mysql_conf_tpl }}'
dest: '{{ mysql_conf_dir[ansible_distribution] }}/{{ mysql_conf_file }}'
owner: root
group: root
mode: 0644
when: mysql_conf_tpl != 'change_me' and ansible_distribution != 'Debian' when: mysql_conf_tpl != 'change_me' and ansible_distribution != 'Debian'
notify: restart mysql notify: restart mysql
@ -17,7 +22,12 @@
when: ansible_distribution == 'Debian' when: ansible_distribution == 'Debian'
- name: Add configuration - name: Add configuration
template: src={{ mysql_conf_tpl }} dest={{ mysql_conf_dir[ansible_distribution] }}/{{ mysql_conf_file }} owner=root group=root mode=0644 template:
src: '{{ mysql_conf_tpl }}'
dest: '{{ mysql_conf_dir[ansible_distribution] }}/{{ mysql_conf_file }}'
owner: root
group: root
mode: 0644
when: mysql_conf_tpl != 'change_me' and ansible_distribution == 'Debian' when: mysql_conf_tpl != 'change_me' and ansible_distribution == 'Debian'
notify: restart mysql notify: restart mysql
@ -44,7 +54,10 @@
when: ansible_distribution == 'Ubuntu' or ansible_distribution == 'Debian' when: ansible_distribution == 'Ubuntu' or ansible_distribution == 'Debian'
- name: Start and enable service - name: Start and enable service
service: name=mysql state=started enabled=yes service:
name: mysql
state: started
enabled: yes
- debug: - debug:
msg: "{{ mysql_root_password }}" msg: "{{ mysql_root_password }}"
@ -52,7 +65,8 @@
- include_tasks: mysql_secure_installation.yml - include_tasks: mysql_secure_installation.yml
when: mysql_root_password is defined when: mysql_root_password is defined
- debug: var=mysql_secure_installation - debug:
var: mysql_secure_installation
when: mysql_secure_installation and mysql_root_password is defined when: mysql_secure_installation and mysql_root_password is defined
... ...

View File

@ -14,5 +14,5 @@
- name: Ensure nginx is installed. - name: Ensure nginx is installed.
apt: apt:
pkg: nginx pkg: nginx
state: installed state: present
default_release: "{{ nginx_default_release }}" default_release: "{{ nginx_default_release }}"

View File

@ -4,7 +4,7 @@
name: name:
- ntp - ntp
- ntpdate - ntpdate
state: installed state: present
when: ansible_distribution == 'CentOS' when: ansible_distribution == 'CentOS'
- name: Enable ntpd - name: Enable ntpd
@ -16,7 +16,7 @@
pkg: pkg:
- ntp - ntp
- ntpdate - ntpdate
state: installed state: present
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
- name: Enable ntpd - name: Enable ntpd