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