Replace code management with r10k
This commit is contained in:
parent
f811ce5fb1
commit
8ee3bb48a2
1 changed files with 5 additions and 32 deletions
|
@ -83,38 +83,6 @@
|
||||||
dest: /etc/puppetlabs/code/environments/production.bak
|
dest: /etc/puppetlabs/code/environments/production.bak
|
||||||
when: puppet_code.stat.exists and not code_readme.stat.exists
|
when: puppet_code.stat.exists and not code_readme.stat.exists
|
||||||
|
|
||||||
- name: Remove puppet code folder if there is no readme (not from repo then)
|
|
||||||
file:
|
|
||||||
path: /etc/puppetlabs/code/environments/production
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: Ensure puppet code repo is cloned
|
|
||||||
git:
|
|
||||||
repo: "{{ puppet_code_repo }}"
|
|
||||||
dest: /etc/puppetlabs/code/environments/production
|
|
||||||
depth: 1
|
|
||||||
|
|
||||||
- name: Ensure service unit to update puppet code exists
|
|
||||||
template:
|
|
||||||
src: templates/update_puppet_code.service.j2
|
|
||||||
dest: /etc/systemd/system/update_puppet_code.service
|
|
||||||
mode: 0644
|
|
||||||
backup: yes
|
|
||||||
notify: Reload Systemd daemon
|
|
||||||
|
|
||||||
- name: Ensure timer unit to update puppet code exists
|
|
||||||
copy:
|
|
||||||
src: files/update_puppet_code.timer
|
|
||||||
dest: /etc/systemd/system/update_puppet_code.timer
|
|
||||||
mode: 0644
|
|
||||||
backup: yes
|
|
||||||
notify: Reload Systemd daemon
|
|
||||||
|
|
||||||
- name: Ensure service to update puppet code is enabled
|
|
||||||
service:
|
|
||||||
name: update_puppet_code
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
- name: Ensure UFW allow access to the server
|
- name: Ensure UFW allow access to the server
|
||||||
ufw:
|
ufw:
|
||||||
rule: allow
|
rule: allow
|
||||||
|
@ -141,5 +109,10 @@
|
||||||
group: puppet
|
group: puppet
|
||||||
backup: true
|
backup: true
|
||||||
|
|
||||||
|
- name: Remove puppet code folder if there is no readme (not from repo then)
|
||||||
|
file:
|
||||||
|
path: /etc/puppetlabs/code/environments/production
|
||||||
|
state: absent
|
||||||
|
|
||||||
- name: Deploy environment
|
- name: Deploy environment
|
||||||
shell: r10k deploy environment --config /etc/puppetlabs/r10k/r10k.yaml
|
shell: r10k deploy environment --config /etc/puppetlabs/r10k/r10k.yaml
|
Loading…
Reference in a new issue