Compare commits
4 Commits
master
...
ilariaalpi
Author | SHA1 | Date | |
---|---|---|---|
b9eae6b189 | |||
d7589283fb | |||
0c6b89963e | |||
79faedc95d |
@ -1,7 +1,6 @@
|
|||||||
$ANSIBLE_VAULT;1.1;AES256
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
34656463636239626332366464373337386539643933653433653362613238666330636334323465
|
38373236666661616335383136393366616563663962313930373937616534393235363439353830
|
||||||
6666373739386430643330666238366237646365623634370a363530303762373036616332313966
|
3436663732616632366330346235656462346161386132660a313065626266306237316239356539
|
||||||
31343339373532346538393164373037396135633631653133663862316161373566633938386234
|
32333139333462363038333433303235386330613562636663323864373033633363373334346639
|
||||||
6366613030386432320a313262383838663262373037643138616131343337626234306436323462
|
6537366431376238370a303366313330626139353266383430346266626337653431376665633934
|
||||||
64333262663662353836303365316433353463326664623838353339376164313235363339313238
|
35306533373031613339373234623161306163313765353336663836643664346333
|
||||||
3865613230306436346365623338366564346633343565623964
|
|
||||||
|
@ -1,48 +1,26 @@
|
|||||||
---
|
---
|
||||||
# Managing epoptes on 'client' role
|
# Managing epoptes on 'client' role
|
||||||
|
|
||||||
- name: Getting epoptes server name
|
|
||||||
get_url:
|
|
||||||
url: "http://{{ ansible_local.domain.serverfqdn }}:3000/epoptes-srv"
|
|
||||||
dest: /tmp/epoptes-srv
|
|
||||||
register: get_epo_srv_name
|
|
||||||
|
|
||||||
- name: Checking for a correct name
|
|
||||||
shell: cat /tmp/epoptes-srv
|
|
||||||
register: epo_srv_name
|
|
||||||
when: get_epo_srv_name is changed
|
|
||||||
changed_when: "'none' not in epo_srv_name.stdout"
|
|
||||||
|
|
||||||
- name: Cleanup
|
|
||||||
file:
|
|
||||||
path: /tmp/epoptes-srv
|
|
||||||
state: absent
|
|
||||||
when: get_epo_srv_name is changed
|
|
||||||
|
|
||||||
- name: Ensuring epoptes-client is installed
|
- name: Ensuring epoptes-client is installed
|
||||||
apt:
|
apt:
|
||||||
name: epoptes-client
|
name: epoptes-client
|
||||||
state: present
|
state: present
|
||||||
when: get_epo_srv_name is changed
|
|
||||||
|
|
||||||
- name: Configuring the client
|
- name: Getting epoptes server name
|
||||||
replace:
|
shell: "curl http://{{ ansible_local.domain.serverfqdn }}:3000/epoptes-srv"
|
||||||
dest: /etc/default/epoptes-client
|
register: epoptes_srv
|
||||||
regexp: "^#SERVER=server"
|
|
||||||
replace: "SERVER={{ epo_srv_name.stdout }}"
|
|
||||||
when: epo_srv_name is changed
|
|
||||||
|
|
||||||
- name: Checking for an already existent certificate
|
- name: Assure epoptes has the correct server
|
||||||
file:
|
lineinfile:
|
||||||
path: /etc/epoptes/server.crt
|
path: /etc/default/epoptes-client
|
||||||
state: file
|
regexp: '^SERVER='
|
||||||
register: crt_epo_exists
|
line: "SERVER={{ epoptes_srv.stdout }}"
|
||||||
ignore_errors: yes
|
insertafter: '^#SERVER'
|
||||||
|
state: present
|
||||||
|
register: changed_srv
|
||||||
|
|
||||||
- name: Getting the epoptes server certificate
|
- name: Getting the certificate in case it was changed
|
||||||
shell: /usr/sbin/epoptes-client -c
|
shell: /usr/sbin/epoptes-client -c
|
||||||
when: crt_epo_exists is failed
|
when: changed_srv is changed
|
||||||
# I don't notify anymore, hoping that this would be done on first run after
|
notify:
|
||||||
# preseed and it should restart because of domain join.
|
- reboot
|
||||||
#notify:
|
|
||||||
# - reboot
|
|
||||||
|
@ -18,14 +18,14 @@
|
|||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
changed_when: "'2:4.1.6+dfsg-1ubuntu2' not in check_samba_version.stdout"
|
changed_when: "'2:4.1.6+dfsg-1ubuntu2' not in check_samba_version.stdout"
|
||||||
|
|
||||||
#- name: Downgrading SAMBA if not the right version
|
- name: Downgrading SAMBA if not the right version
|
||||||
# shell: "/var/lib/{{ ansible_local.domain.domainfull }}/bin/downgrade_samba.sh"
|
shell: "/var/lib/{{ ansible_local.domain.domainfull }}/bin/downgrade_samba.sh"
|
||||||
# when: check_samba_version is changed
|
when: check_samba_version is changed
|
||||||
#
|
|
||||||
#- name: Checking again for the correct SAMBA version
|
- name: Checking again for the correct SAMBA version
|
||||||
# shell: dpkg -l | grep libsmbclient
|
shell: dpkg -l | grep libsmbclient
|
||||||
# register: recheck_samba_version
|
register: recheck_samba_version
|
||||||
# changed_when: "'2:4.1.6+dfsg-1ubuntu2' in check_samba_version.stdout"
|
changed_when: "'2:4.1.6+dfsg-1ubuntu2' in check_samba_version.stdout"
|
||||||
|
|
||||||
- name: Installing domain packages
|
- name: Installing domain packages
|
||||||
apt:
|
apt:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user