Commit 1467fe85 authored by Stephen Seltzer's avatar Stephen Seltzer

Updates sudo_user to become

parent d27c0dd4
......@@ -76,15 +76,23 @@
- name: make sure activemq is started
service: name="{{ activemq_service_name }}" state="started"
- name: update facts file
lineinfile: "dest='/etc/ansible/facts.d/build_vars.fact' create=true regexp='[activemq]' line='[activemq]'"
- lineinfile: "dest='/etc/ansible/facts.d/build_vars.fact' regexp='activemq_version' line='activemq_version={{ activemq_version }}'"
- lineinfile: "dest='/etc/ansible/facts.d/build_vars.fact' regexp='activemq_name' line='activemq_name={{ activemq_name }}'"
- lineinfile: "dest='/etc/ansible/facts.d/build_vars.fact' regexp='activemq_group' line='activemq_group={{ activemq_group }}'"
- lineinfile: "dest='/etc/ansible/facts.d/build_vars.fact' regexp='activemq_service_name' line='activemq_service_name={{ activemq_service_name }}'"
- lineinfile: "dest='/etc/ansible/facts.d/build_vars.fact' regexp='activemq_inst_directory' line='activemq_inst_directory={{ activemq_inst_directory }}'"
- lineinfile: "dest='/etc/ansible/facts.d/build_vars.fact' regexp='activemq_home_directory' line='activemq_home_directory={{ activemq_home_directory }}'"
- lineinfile: "dest='/etc/ansible/facts.d/build_vars.fact' regexp='activemq_rar_url' line='activemq_rar_url={{ activemq_rar_url }}'"
lineinfile:
dest: /etc/ansible/facts.d/build_vars.fact
state: present
create: yes
mode: 0600
regexp: "{{ item.regexp }}"
line: "{{ item.line }}"
with_items:
- { regexp: '[activemq]', line: '[activemq]' }
- { regexp: 'activemq_version', line: "activemq_version={{ activemq_version }}" }
- { regexp: 'activemq_name', line: "activemq_name={{ activemq_name }}" }
- { regexp: 'activemq_group', line: "activemq_group={{ activemq_group }}" }
- { regexp: 'activemq_service_name', line: "activemq_service_name={{ activemq_service_name }}" }
- { regexp: 'activemq_inst_directory', line: "activemq_inst_directory={{ activemq_inst_directory }}" }
- { regexp: 'activemq_home_directory', line: "activemq_home_directory={{ activemq_home_directory }}" }
- { regexp: 'activemq_rar_url', line: "activemq_rar_url={{ activemq_rar_url }}" }
......@@ -4,15 +4,15 @@
- name: create the postgresql database
postgresql_db: name={{ db_name }}
encoding='UTF-8'
sudo_user: postgres
become: true
become_user: postgres
- name: create the postgresql user
postgresql_user: name={{ db_user }} password={{ db_user_pw }}
sudo_user: postgres
- name: create password file on vagrant box
become: true
become_user: postgres
- name: create password file on vagrant box
lineinfile:
dest: ~/.pgpass
state: present
......
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