add debug
This commit is contained in:
parent
4254d8675a
commit
add653a260
1 changed files with 18 additions and 3 deletions
|
@ -33,6 +33,12 @@
|
||||||
- not puppet_agent.stat.exists
|
- not puppet_agent.stat.exists
|
||||||
- puppet_script.stdout == ''
|
- puppet_script.stdout == ''
|
||||||
|
|
||||||
|
- name: Show puppet_script
|
||||||
|
debug:
|
||||||
|
msg: "{{ puppet_script }}"
|
||||||
|
when:
|
||||||
|
- not puppet_agent.stat.exists
|
||||||
|
|
||||||
- name: Check puppet agent was found
|
- name: Check puppet agent was found
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -48,8 +54,17 @@
|
||||||
when:
|
when:
|
||||||
- not puppet_agent.stat.exists
|
- not puppet_agent.stat.exists
|
||||||
|
|
||||||
|
- name: Link agent to /usr/local/bin
|
||||||
|
file:
|
||||||
|
state: link
|
||||||
|
dest: /usr/local/bin/puppet
|
||||||
|
src: "{{ puppet_agent_cmd }}"
|
||||||
|
when:
|
||||||
|
- puppet_agent_cmd != '/usr/local/bin/puppet'
|
||||||
|
|
||||||
|
|
||||||
- name: Obtain puppet configuration directory
|
- name: Obtain puppet configuration directory
|
||||||
shell: "{{ puppet_agent_cmd }} config print confdir"
|
shell: "/usr/local/bin/puppet config print confdir"
|
||||||
register: current_puppet_confdir
|
register: current_puppet_confdir
|
||||||
|
|
||||||
- name: Ensure puppet server is configured in main section
|
- name: Ensure puppet server is configured in main section
|
||||||
|
@ -113,7 +128,7 @@
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
- name: Run puppet for the first time
|
- name: Run puppet for the first time
|
||||||
shell: "{{ puppet_agent_cmd }} agent -t"
|
shell: "/usr/local/bin/puppet agent -t"
|
||||||
when: run_puppet
|
when: run_puppet
|
||||||
|
|
||||||
- name: Ensure puppet agent service is enabled and started
|
- name: Ensure puppet agent service is enabled and started
|
||||||
|
@ -127,6 +142,6 @@
|
||||||
- name: Ensure puppet agent cron exists (WSL only)
|
- name: Ensure puppet agent cron exists (WSL only)
|
||||||
cron:
|
cron:
|
||||||
name: puppet agent
|
name: puppet agent
|
||||||
job: "{{ puppet_agent_cmd }} agent -t"
|
job: "/usr/local/bin/puppet agent -t"
|
||||||
minute: '30'
|
minute: '30'
|
||||||
when: "'WSL' in ansible_facts['kernel']"
|
when: "'WSL' in ansible_facts['kernel']"
|
||||||
|
|
Loading…
Reference in a new issue