fix lineinfile of python post task
This commit is contained in:
parent
3ad048e5b8
commit
a077911077
|
@ -1,3 +1,3 @@
|
|||
shelfzilla_base_path: /opt/shelfzilla
|
||||
shelfzillla_config_file: "{{ shelfzilla_base_path }}/shelfzilla.toml"
|
||||
shelfzillla_config_file: 'shelfzilla.toml'
|
||||
system_init_path: /etc/init.d
|
|
@ -6,7 +6,7 @@
|
|||
- lineinfile: dest="{{shelfzilla_base_path}}/shelfzilla/settings/configfile.py"
|
||||
regexp="^(.*)os\.environ\[\'APP\_CONFIGFILE\'\](.*)$"
|
||||
state=present
|
||||
line="\'\1{{ shelfzillla_config_file }}\2\'"
|
||||
line="\1\'{{ shelfzilla_base_path }}/{{ shelfzillla_config_file }}\'\2"
|
||||
backrefs=yes
|
||||
sudo: yes
|
||||
|
||||
|
|
|
@ -70,19 +70,21 @@
|
|||
- stat: path="{{ logfile }}"
|
||||
register: st
|
||||
|
||||
- name: Create Logfile
|
||||
file: path="{{ logfile }}"
|
||||
owner=root
|
||||
group=root
|
||||
mode=0666
|
||||
state=file
|
||||
sudo: yes
|
||||
when: not st.stat.exists
|
||||
|
||||
- name: Create Static base path
|
||||
- name: Create LogPath
|
||||
file: path="{{ logpath }}"
|
||||
owner=root
|
||||
group=root
|
||||
mode=0755
|
||||
state=directory
|
||||
sudo: yes
|
||||
|
||||
- name: Create Logfile
|
||||
file: path="{{ logfile }}"
|
||||
owner=root
|
||||
group=root
|
||||
mode=0666
|
||||
state=touch
|
||||
sudo: yes
|
||||
when: not st.stat.exists
|
||||
|
||||
|
||||
|
|
Reference in New Issue