From e51ac240c3d69faf407be5f2674f33dd0346d244 Mon Sep 17 00:00:00 2001 From: Maciej Kwiek Date: Mon, 22 Feb 2016 10:04:52 +0100 Subject: [PATCH] Change sudo to become in ansible resources As we are using ansible 2.0, we should move from sudo to become to avoid deprecation. Change-Id: Ia084759b9c38f5c045ab14eab3af63a2ad33069f Closes-bug: 1547430 --- resources/ansible_local/0.0.1/actions/run.yaml | 4 ++-- .../ansible_local/0.0.1/actions/test_role/defaults/main.yaml | 2 +- .../ansible_local/0.0.1/actions/test_role/tasks/main.yaml | 2 +- resources/ansible_remote/0.0.1/actions/run.yaml | 4 ++-- resources/apt_repo/1.0.0/actions/remove.yaml | 2 +- resources/apt_repo/1.0.0/actions/run.yaml | 2 +- resources/container_networks/1.0.0/actions/run.yaml | 2 +- resources/data_container/1.0.0/actions/echo.yaml | 2 +- resources/data_container/1.0.0/actions/remove.yaml | 2 +- resources/data_container/1.0.0/actions/run.yaml | 2 +- resources/dnsmasq/1.0.0/actions/exclude_mac_pxe.yaml | 2 +- resources/dnsmasq/1.0.0/actions/run.yaml | 2 +- resources/docker/1.0.0/actions/run.yaml | 2 +- resources/docker_container/1.0.0/actions/remove.yaml | 2 +- resources/docker_container/1.0.0/actions/run.yaml | 2 +- resources/docker_container/1.0.0/actions/update.yaml | 2 +- resources/glance_api_service/1.0.0/actions/remove.yaml | 2 +- resources/glance_api_service/1.0.0/actions/run.yaml | 2 +- resources/glance_config/1.0.0/actions/remove.yaml | 2 +- resources/glance_config/1.0.0/actions/run.yaml | 2 +- resources/glance_registry_service/1.0.0/actions/remove.yaml | 2 +- resources/glance_registry_service/1.0.0/actions/run.yaml | 2 +- resources/haproxy_config/1.0.0/actions/remove.yaml | 2 +- resources/haproxy_config/1.0.0/actions/run.yaml | 2 +- resources/haproxy_config/1.0.0/actions/update.yaml | 2 +- resources/haproxy_service/1.0.0/actions/apply_config.yaml | 2 +- resources/haproxy_service/1.0.0/actions/install.yaml | 2 +- resources/haproxy_service/1.0.0/actions/remove.yaml | 2 +- resources/haproxy_service/1.0.0/actions/run.yaml | 2 +- resources/haproxy_service/1.0.0/actions/update.yaml | 2 +- resources/hosts_file/1.0.0/actions/remove.yaml | 2 +- resources/hosts_file/1.0.0/actions/run.yaml | 2 +- resources/hosts_file/1.0.0/actions/update.yaml | 2 +- resources/keystone_config/1.0.0/actions/remove.yaml | 2 +- resources/keystone_config/1.0.0/actions/run.yaml | 2 +- resources/keystone_role/1.0.0/actions/remove.yaml | 2 +- resources/keystone_role/1.0.0/actions/run.yaml | 2 +- resources/keystone_service/1.0.0/actions/remove.yaml | 2 +- resources/keystone_service/1.0.0/actions/run.yaml | 2 +- resources/keystone_service_endpoint/1.0.0/actions/remove.yaml | 2 +- resources/keystone_service_endpoint/1.0.0/actions/run.yaml | 2 +- resources/keystone_tenant/1.0.0/actions/remove.yaml | 2 +- resources/keystone_tenant/1.0.0/actions/run.yaml | 2 +- resources/keystone_user/1.0.0/actions/remove.yaml | 2 +- resources/keystone_user/1.0.0/actions/run.yaml | 2 +- resources/librarian/0.0.1/actions/remove.yaml | 2 +- resources/librarian/0.0.1/actions/run.yaml | 2 +- resources/lxc_container/1.0.0/actions/run.yaml | 2 +- resources/lxc_host/1.0.0/actions/run.yaml | 4 ++-- resources/managed_apt/1.0.0/actions/run.yaml | 2 +- resources/mariadb_db/1.0.0/actions/remove.yaml | 2 +- resources/mariadb_db/1.0.0/actions/run.yaml | 2 +- resources/mariadb_service/1.0.0/actions/remove.yaml | 2 +- resources/mariadb_service/1.0.0/actions/run.yaml | 2 +- resources/mariadb_user/1.0.0/actions/remove.yaml | 2 +- resources/mariadb_user/1.0.0/actions/run.yaml | 2 +- resources/mariadb_user/1.0.0/actions/update.yaml | 2 +- resources/openrc_file/1.0.0/actions/remove.yaml | 2 +- resources/openrc_file/1.0.0/actions/run.yaml | 2 +- resources/rabbitmq_config/1.0.0/actions/remove.yaml | 2 +- resources/rabbitmq_config/1.0.0/actions/run.yaml | 2 +- resources/rabbitmq_user/1.0.0/actions/remove.yaml | 2 +- resources/rabbitmq_user/1.0.0/actions/run.yaml | 2 +- resources/rabbitmq_vhost/1.0.0/actions/remove.yaml | 2 +- resources/rabbitmq_vhost/1.0.0/actions/run.yaml | 2 +- resources/riak_join_single/1.0.0/actions/join.yaml | 2 +- resources/riak_node/1.0.0/actions/commit.yaml | 2 +- resources/riak_node/1.0.0/actions/join.yaml | 2 +- resources/riak_node/1.0.0/actions/remove.yaml | 2 +- resources/riak_node/1.0.0/actions/run.yaml | 2 +- resources/riak_node/1.0.0/actions/update.yaml | 2 +- resources/solar_bootstrap/1.0.0/actions/run.yaml | 2 +- resources/ssh_key/1.0.0/actions/run.yaml | 2 +- resources/transport_solar_agent/1.0.0/actions/run.yaml | 2 +- resources/transport_solar_agent/1.0.0/actions/update.yaml | 2 +- resources/transport_torrent/1.0.0/actions/run.yaml | 2 +- resources/volume_group/1.0.0/actions/remove.yaml | 2 +- resources/volume_group/1.0.0/actions/run.yaml | 2 +- resources/vxlan_mesh/1.0.0/actions/run.yaml | 2 +- 79 files changed, 82 insertions(+), 82 deletions(-) diff --git a/resources/ansible_local/0.0.1/actions/run.yaml b/resources/ansible_local/0.0.1/actions/run.yaml index 7351a73..489a1e6 100644 --- a/resources/ansible_local/0.0.1/actions/run.yaml +++ b/resources/ansible_local/0.0.1/actions/run.yaml @@ -1,9 +1,9 @@ - hosts: localhost - sudo: yes + become: yes vars: var1: 'playbook' roles: - { role: "test_role" } tasks: - debug: msg="VAR1 value is {{var1}}" - - fail: msg='just test failure' \ No newline at end of file + - fail: msg='just test failure' diff --git a/resources/ansible_local/0.0.1/actions/test_role/defaults/main.yaml b/resources/ansible_local/0.0.1/actions/test_role/defaults/main.yaml index 1467149..783a755 100644 --- a/resources/ansible_local/0.0.1/actions/test_role/defaults/main.yaml +++ b/resources/ansible_local/0.0.1/actions/test_role/defaults/main.yaml @@ -1,4 +1,4 @@ var1: initial uuid: stuff -def1: the_same \ No newline at end of file +def1: the_same diff --git a/resources/ansible_local/0.0.1/actions/test_role/tasks/main.yaml b/resources/ansible_local/0.0.1/actions/test_role/tasks/main.yaml index 1c628a0..70939a4 100644 --- a/resources/ansible_local/0.0.1/actions/test_role/tasks/main.yaml +++ b/resources/ansible_local/0.0.1/actions/test_role/tasks/main.yaml @@ -1 +1 @@ -- debug: msg="Variable1 {{ var1 }} with uuid {{ uuid }} and default var {{ def1 }}" \ No newline at end of file +- debug: msg="Variable1 {{ var1 }} with uuid {{ uuid }} and default var {{ def1 }}" diff --git a/resources/ansible_remote/0.0.1/actions/run.yaml b/resources/ansible_remote/0.0.1/actions/run.yaml index 7482f7f..df22978 100644 --- a/resources/ansible_remote/0.0.1/actions/run.yaml +++ b/resources/ansible_remote/0.0.1/actions/run.yaml @@ -1,6 +1,6 @@ - hosts: '*' - sudo: yes + become: yes vars: default1: playbook tasks: - - debug: msg="my message {{default1}}" \ No newline at end of file + - debug: msg="my message {{default1}}" diff --git a/resources/apt_repo/1.0.0/actions/remove.yaml b/resources/apt_repo/1.0.0/actions/remove.yaml index 55de221..f6baf12 100644 --- a/resources/apt_repo/1.0.0/actions/remove.yaml +++ b/resources/apt_repo/1.0.0/actions/remove.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - shell: rm -f {{item}} with_items: diff --git a/resources/apt_repo/1.0.0/actions/run.yaml b/resources/apt_repo/1.0.0/actions/run.yaml index 7897049..5841b0f 100644 --- a/resources/apt_repo/1.0.0/actions/run.yaml +++ b/resources/apt_repo/1.0.0/actions/run.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - template: src: {{templates_dir}}/source diff --git a/resources/container_networks/1.0.0/actions/run.yaml b/resources/container_networks/1.0.0/actions/run.yaml index a7ef804..affa22c 100644 --- a/resources/container_networks/1.0.0/actions/run.yaml +++ b/resources/container_networks/1.0.0/actions/run.yaml @@ -1,5 +1,5 @@ - hosts: '*' - sudo: yes + become: yes gather_facts: false # this is default variables, they will be overwritten by resource one vars: diff --git a/resources/data_container/1.0.0/actions/echo.yaml b/resources/data_container/1.0.0/actions/echo.yaml index affdbef..2dfe81d 100644 --- a/resources/data_container/1.0.0/actions/echo.yaml +++ b/resources/data_container/1.0.0/actions/echo.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - shell: echo `/sbin/ifconfig` diff --git a/resources/data_container/1.0.0/actions/remove.yaml b/resources/data_container/1.0.0/actions/remove.yaml index 50b041f..96cfb43 100644 --- a/resources/data_container/1.0.0/actions/remove.yaml +++ b/resources/data_container/1.0.0/actions/remove.yaml @@ -1,6 +1,6 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - shell: docker stop {{ resource_name }} - shell: docker rm {{ resource_name }} diff --git a/resources/data_container/1.0.0/actions/run.yaml b/resources/data_container/1.0.0/actions/run.yaml index b61979e..91ec6d4 100644 --- a/resources/data_container/1.0.0/actions/run.yaml +++ b/resources/data_container/1.0.0/actions/run.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - docker: name: {{ resource_name }} diff --git a/resources/dnsmasq/1.0.0/actions/exclude_mac_pxe.yaml b/resources/dnsmasq/1.0.0/actions/exclude_mac_pxe.yaml index 91b1641..33de877 100644 --- a/resources/dnsmasq/1.0.0/actions/exclude_mac_pxe.yaml +++ b/resources/dnsmasq/1.0.0/actions/exclude_mac_pxe.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - lineinfile: create=yes dest=/etc/dnsmasq.d/no_pxe_{{exclude_mac_pxe | replace(':', '_')}}.conf line="dhcp-host={{exclude_mac_pxe}},set:nopxe" diff --git a/resources/dnsmasq/1.0.0/actions/run.yaml b/resources/dnsmasq/1.0.0/actions/run.yaml index 9c29505..87612fe 100644 --- a/resources/dnsmasq/1.0.0/actions/run.yaml +++ b/resources/dnsmasq/1.0.0/actions/run.yaml @@ -1,2 +1,2 @@ - hosts: [{{host}}] - sudo: yes + become: yes diff --git a/resources/docker/1.0.0/actions/run.yaml b/resources/docker/1.0.0/actions/run.yaml index 4d582f8..723ee0c 100644 --- a/resources/docker/1.0.0/actions/run.yaml +++ b/resources/docker/1.0.0/actions/run.yaml @@ -1,6 +1,6 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - shell: docker --version ignore_errors: true diff --git a/resources/docker_container/1.0.0/actions/remove.yaml b/resources/docker_container/1.0.0/actions/remove.yaml index 50b041f..96cfb43 100644 --- a/resources/docker_container/1.0.0/actions/remove.yaml +++ b/resources/docker_container/1.0.0/actions/remove.yaml @@ -1,6 +1,6 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - shell: docker stop {{ resource_name }} - shell: docker rm {{ resource_name }} diff --git a/resources/docker_container/1.0.0/actions/run.yaml b/resources/docker_container/1.0.0/actions/run.yaml index 8bd32cc..5003508 100644 --- a/resources/docker_container/1.0.0/actions/run.yaml +++ b/resources/docker_container/1.0.0/actions/run.yaml @@ -1,6 +1,6 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - docker: name: {{ resource_name }} diff --git a/resources/docker_container/1.0.0/actions/update.yaml b/resources/docker_container/1.0.0/actions/update.yaml index 727a305..74f7c70 100644 --- a/resources/docker_container/1.0.0/actions/update.yaml +++ b/resources/docker_container/1.0.0/actions/update.yaml @@ -1,6 +1,6 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - docker: name: {{ resource_name }} diff --git a/resources/glance_api_service/1.0.0/actions/remove.yaml b/resources/glance_api_service/1.0.0/actions/remove.yaml index 9b145ab..d68243d 100644 --- a/resources/glance_api_service/1.0.0/actions/remove.yaml +++ b/resources/glance_api_service/1.0.0/actions/remove.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - name: glance api container docker: diff --git a/resources/glance_api_service/1.0.0/actions/run.yaml b/resources/glance_api_service/1.0.0/actions/run.yaml index 7a5b8be..83ee011 100644 --- a/resources/glance_api_service/1.0.0/actions/run.yaml +++ b/resources/glance_api_service/1.0.0/actions/run.yaml @@ -1,6 +1,6 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - docker: command: /bin/bash -c "glance-manage db_sync && /usr/bin/glance-api" diff --git a/resources/glance_config/1.0.0/actions/remove.yaml b/resources/glance_config/1.0.0/actions/remove.yaml index 95cf18d..f3e21ff 100644 --- a/resources/glance_config/1.0.0/actions/remove.yaml +++ b/resources/glance_config/1.0.0/actions/remove.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - shell: echo 'removed' diff --git a/resources/glance_config/1.0.0/actions/run.yaml b/resources/glance_config/1.0.0/actions/run.yaml index bc26552..8fac439 100644 --- a/resources/glance_config/1.0.0/actions/run.yaml +++ b/resources/glance_config/1.0.0/actions/run.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes vars: ip: {{ ip }} api_port: {{ api_port }} diff --git a/resources/glance_registry_service/1.0.0/actions/remove.yaml b/resources/glance_registry_service/1.0.0/actions/remove.yaml index b73c63a..5c87e8c 100644 --- a/resources/glance_registry_service/1.0.0/actions/remove.yaml +++ b/resources/glance_registry_service/1.0.0/actions/remove.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - name: glance registry container docker: diff --git a/resources/glance_registry_service/1.0.0/actions/run.yaml b/resources/glance_registry_service/1.0.0/actions/run.yaml index c5a6801..b312b81 100644 --- a/resources/glance_registry_service/1.0.0/actions/run.yaml +++ b/resources/glance_registry_service/1.0.0/actions/run.yaml @@ -1,6 +1,6 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - docker: #command: /bin/bash -c "glance-manage db_sync && /usr/bin/glance-registry" diff --git a/resources/haproxy_config/1.0.0/actions/remove.yaml b/resources/haproxy_config/1.0.0/actions/remove.yaml index 3e05d9c..5fb3997 100644 --- a/resources/haproxy_config/1.0.0/actions/remove.yaml +++ b/resources/haproxy_config/1.0.0/actions/remove.yaml @@ -1,5 +1,5 @@ # TODO - hosts: [{{host}}] - sudo: yes + become: yes tasks: - file: path={{ config_dir.value['src'] }} state=absent diff --git a/resources/haproxy_config/1.0.0/actions/run.yaml b/resources/haproxy_config/1.0.0/actions/run.yaml index e4aaf9b..0f09c2c 100644 --- a/resources/haproxy_config/1.0.0/actions/run.yaml +++ b/resources/haproxy_config/1.0.0/actions/run.yaml @@ -1,6 +1,6 @@ # TODO - hosts: [{{host}}] - sudo: yes + become: yes vars: config_dir: {src: {{ config_dir['src'] }}, dst: {{ config_dir['dst'] }}} haproxy_ip: {{ ip }} diff --git a/resources/haproxy_config/1.0.0/actions/update.yaml b/resources/haproxy_config/1.0.0/actions/update.yaml index e4aaf9b..0f09c2c 100644 --- a/resources/haproxy_config/1.0.0/actions/update.yaml +++ b/resources/haproxy_config/1.0.0/actions/update.yaml @@ -1,6 +1,6 @@ # TODO - hosts: [{{host}}] - sudo: yes + become: yes vars: config_dir: {src: {{ config_dir['src'] }}, dst: {{ config_dir['dst'] }}} haproxy_ip: {{ ip }} diff --git a/resources/haproxy_service/1.0.0/actions/apply_config.yaml b/resources/haproxy_service/1.0.0/actions/apply_config.yaml index 8dc2983..7cdf502 100644 --- a/resources/haproxy_service/1.0.0/actions/apply_config.yaml +++ b/resources/haproxy_service/1.0.0/actions/apply_config.yaml @@ -1,6 +1,6 @@ - hosts: [{{ host }}] - sudo: yes + become: yes tasks: - service: name: haproxy diff --git a/resources/haproxy_service/1.0.0/actions/install.yaml b/resources/haproxy_service/1.0.0/actions/install.yaml index 6817374..e6e6e3f 100644 --- a/resources/haproxy_service/1.0.0/actions/install.yaml +++ b/resources/haproxy_service/1.0.0/actions/install.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - apt: name: haproxy diff --git a/resources/haproxy_service/1.0.0/actions/remove.yaml b/resources/haproxy_service/1.0.0/actions/remove.yaml index ce6e8b8..3bb6d1a 100644 --- a/resources/haproxy_service/1.0.0/actions/remove.yaml +++ b/resources/haproxy_service/1.0.0/actions/remove.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - name: haproxy container docker: diff --git a/resources/haproxy_service/1.0.0/actions/run.yaml b/resources/haproxy_service/1.0.0/actions/run.yaml index 6817374..e6e6e3f 100644 --- a/resources/haproxy_service/1.0.0/actions/run.yaml +++ b/resources/haproxy_service/1.0.0/actions/run.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - apt: name: haproxy diff --git a/resources/haproxy_service/1.0.0/actions/update.yaml b/resources/haproxy_service/1.0.0/actions/update.yaml index 6f91682..a67c7f6 100644 --- a/resources/haproxy_service/1.0.0/actions/update.yaml +++ b/resources/haproxy_service/1.0.0/actions/update.yaml @@ -1,6 +1,6 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - service: name: haproxy diff --git a/resources/hosts_file/1.0.0/actions/remove.yaml b/resources/hosts_file/1.0.0/actions/remove.yaml index d211b58..f458fac 100644 --- a/resources/hosts_file/1.0.0/actions/remove.yaml +++ b/resources/hosts_file/1.0.0/actions/remove.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - name: Remove hosts file shell: echo '# flushed by ansible' > /etc/hosts diff --git a/resources/hosts_file/1.0.0/actions/run.yaml b/resources/hosts_file/1.0.0/actions/run.yaml index 8ad5f23..76e05c8 100644 --- a/resources/hosts_file/1.0.0/actions/run.yaml +++ b/resources/hosts_file/1.0.0/actions/run.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: {% for val in hosts %} - name: Create hosts entries for {{val['name']}} => {{val['ip']}} diff --git a/resources/hosts_file/1.0.0/actions/update.yaml b/resources/hosts_file/1.0.0/actions/update.yaml index 8ad5f23..76e05c8 100644 --- a/resources/hosts_file/1.0.0/actions/update.yaml +++ b/resources/hosts_file/1.0.0/actions/update.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: {% for val in hosts %} - name: Create hosts entries for {{val['name']}} => {{val['ip']}} diff --git a/resources/keystone_config/1.0.0/actions/remove.yaml b/resources/keystone_config/1.0.0/actions/remove.yaml index 48094d2..e734f31 100644 --- a/resources/keystone_config/1.0.0/actions/remove.yaml +++ b/resources/keystone_config/1.0.0/actions/remove.yaml @@ -1,4 +1,4 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - file: path={{config_dir}} state=absent diff --git a/resources/keystone_config/1.0.0/actions/run.yaml b/resources/keystone_config/1.0.0/actions/run.yaml index 3265bbc..4cd08b2 100644 --- a/resources/keystone_config/1.0.0/actions/run.yaml +++ b/resources/keystone_config/1.0.0/actions/run.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes vars: admin_token: {{admin_token}} keystone_host: {{ ip }} diff --git a/resources/keystone_role/1.0.0/actions/remove.yaml b/resources/keystone_role/1.0.0/actions/remove.yaml index 6b723fa..50969db 100644 --- a/resources/keystone_role/1.0.0/actions/remove.yaml +++ b/resources/keystone_role/1.0.0/actions/remove.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - name: keystone role #TODO: not implemented in module diff --git a/resources/keystone_role/1.0.0/actions/run.yaml b/resources/keystone_role/1.0.0/actions/run.yaml index 983185d..74aead8 100644 --- a/resources/keystone_role/1.0.0/actions/run.yaml +++ b/resources/keystone_role/1.0.0/actions/run.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - name: install python-keystoneclient shell: apt-get install python-keystoneclient diff --git a/resources/keystone_service/1.0.0/actions/remove.yaml b/resources/keystone_service/1.0.0/actions/remove.yaml index 73ef93a..2036dec 100644 --- a/resources/keystone_service/1.0.0/actions/remove.yaml +++ b/resources/keystone_service/1.0.0/actions/remove.yaml @@ -1,6 +1,6 @@ # TODO - hosts: [{{host}}] - sudo: yes + become: yes tasks: - name: keystone container docker: diff --git a/resources/keystone_service/1.0.0/actions/run.yaml b/resources/keystone_service/1.0.0/actions/run.yaml index 49eb2e0..c3a5e5d 100644 --- a/resources/keystone_service/1.0.0/actions/run.yaml +++ b/resources/keystone_service/1.0.0/actions/run.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - name: keystone container docker: diff --git a/resources/keystone_service_endpoint/1.0.0/actions/remove.yaml b/resources/keystone_service_endpoint/1.0.0/actions/remove.yaml index 8d366fa..fd5d449 100644 --- a/resources/keystone_service_endpoint/1.0.0/actions/remove.yaml +++ b/resources/keystone_service_endpoint/1.0.0/actions/remove.yaml @@ -1,5 +1,5 @@ - hosts: [{{ host }}] - sudo: yes + become: yes vars: ip: {{ip}} port: {{port}} diff --git a/resources/keystone_service_endpoint/1.0.0/actions/run.yaml b/resources/keystone_service_endpoint/1.0.0/actions/run.yaml index 2bc3143..e7199e1 100644 --- a/resources/keystone_service_endpoint/1.0.0/actions/run.yaml +++ b/resources/keystone_service_endpoint/1.0.0/actions/run.yaml @@ -1,5 +1,5 @@ - hosts: [{{ host }}] - sudo: yes + become: yes tasks: - name: keystone service and endpoint keystone_service: diff --git a/resources/keystone_tenant/1.0.0/actions/remove.yaml b/resources/keystone_tenant/1.0.0/actions/remove.yaml index c41de2d..f7aef35 100644 --- a/resources/keystone_tenant/1.0.0/actions/remove.yaml +++ b/resources/keystone_tenant/1.0.0/actions/remove.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - name: keystone tenant keystone_user: endpoint=http://{{keystone_host}}:{{keystone_port}}/v2.0/ token={{admin_token}} tenant={{tenant_name}} state=absent diff --git a/resources/keystone_tenant/1.0.0/actions/run.yaml b/resources/keystone_tenant/1.0.0/actions/run.yaml index 925522f..07286db 100644 --- a/resources/keystone_tenant/1.0.0/actions/run.yaml +++ b/resources/keystone_tenant/1.0.0/actions/run.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - name: install python-keystoneclient shell: apt-get install python-keystoneclient diff --git a/resources/keystone_user/1.0.0/actions/remove.yaml b/resources/keystone_user/1.0.0/actions/remove.yaml index 8748d49..f28feff 100644 --- a/resources/keystone_user/1.0.0/actions/remove.yaml +++ b/resources/keystone_user/1.0.0/actions/remove.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - name: keystone user #TODO: not implemented in module diff --git a/resources/keystone_user/1.0.0/actions/run.yaml b/resources/keystone_user/1.0.0/actions/run.yaml index ecccca5..8c1779e 100644 --- a/resources/keystone_user/1.0.0/actions/run.yaml +++ b/resources/keystone_user/1.0.0/actions/run.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - name: install python-keystoneclient shell: apt-get install python-keystoneclient diff --git a/resources/librarian/0.0.1/actions/remove.yaml b/resources/librarian/0.0.1/actions/remove.yaml index c948ead..6226604 100644 --- a/resources/librarian/0.0.1/actions/remove.yaml +++ b/resources/librarian/0.0.1/actions/remove.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - file: path={{modules_path}} state=absent - file: path={{modules_path}}/../Puppetfile state=absent diff --git a/resources/librarian/0.0.1/actions/run.yaml b/resources/librarian/0.0.1/actions/run.yaml index 391e6f8..201046b 100644 --- a/resources/librarian/0.0.1/actions/run.yaml +++ b/resources/librarian/0.0.1/actions/run.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: # XXX: check apt package http://packages.ubuntu.com/trusty/ruby/librarian-puppet - shell: gem install librarian-puppet --no-ri --no-rdoc diff --git a/resources/lxc_container/1.0.0/actions/run.yaml b/resources/lxc_container/1.0.0/actions/run.yaml index 9b8a4b6..63fe42b 100644 --- a/resources/lxc_container/1.0.0/actions/run.yaml +++ b/resources/lxc_container/1.0.0/actions/run.yaml @@ -1,5 +1,5 @@ - hosts: '*' - sudo: yes + become: yes gather_facts: false # this is default variables, they will be overwritten by resource one vars: diff --git a/resources/lxc_host/1.0.0/actions/run.yaml b/resources/lxc_host/1.0.0/actions/run.yaml index 64805e2..0c25d7a 100644 --- a/resources/lxc_host/1.0.0/actions/run.yaml +++ b/resources/lxc_host/1.0.0/actions/run.yaml @@ -1,6 +1,6 @@ - hosts: '*' - sudo: yes + become: yes roles: - { role: "lxc_hosts", tags: [ "lxc-host", "host-setup" ] } post_tasks: - - shell: pip install git+https://github.com/lxc/python2-lxc.git#egg=lxc \ No newline at end of file + - shell: pip install git+https://github.com/lxc/python2-lxc.git#egg=lxc diff --git a/resources/managed_apt/1.0.0/actions/run.yaml b/resources/managed_apt/1.0.0/actions/run.yaml index 2776ef0..9465a5d 100644 --- a/resources/managed_apt/1.0.0/actions/run.yaml +++ b/resources/managed_apt/1.0.0/actions/run.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - shell: echo 'Managed by solar' > /etc/apt/sources.list when: {{ensure_other_removed}} diff --git a/resources/mariadb_db/1.0.0/actions/remove.yaml b/resources/mariadb_db/1.0.0/actions/remove.yaml index ca5f960..4d5334c 100644 --- a/resources/mariadb_db/1.0.0/actions/remove.yaml +++ b/resources/mariadb_db/1.0.0/actions/remove.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - name: mariadb db mysql_db: diff --git a/resources/mariadb_db/1.0.0/actions/run.yaml b/resources/mariadb_db/1.0.0/actions/run.yaml index 11adc5b..141f48a 100644 --- a/resources/mariadb_db/1.0.0/actions/run.yaml +++ b/resources/mariadb_db/1.0.0/actions/run.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - name: mariadb db mysql_db: diff --git a/resources/mariadb_service/1.0.0/actions/remove.yaml b/resources/mariadb_service/1.0.0/actions/remove.yaml index 0ec5e3f..e5020fb 100644 --- a/resources/mariadb_service/1.0.0/actions/remove.yaml +++ b/resources/mariadb_service/1.0.0/actions/remove.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - name: mariadb container docker: diff --git a/resources/mariadb_service/1.0.0/actions/run.yaml b/resources/mariadb_service/1.0.0/actions/run.yaml index 1275c82..5519b1e 100644 --- a/resources/mariadb_service/1.0.0/actions/run.yaml +++ b/resources/mariadb_service/1.0.0/actions/run.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - file: path=/var/lib/docker/data/{{resource_name}} state=directory - name: mariadb container diff --git a/resources/mariadb_user/1.0.0/actions/remove.yaml b/resources/mariadb_user/1.0.0/actions/remove.yaml index e07cd07..7a948c0 100644 --- a/resources/mariadb_user/1.0.0/actions/remove.yaml +++ b/resources/mariadb_user/1.0.0/actions/remove.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - name: mariadb user mysql_user: diff --git a/resources/mariadb_user/1.0.0/actions/run.yaml b/resources/mariadb_user/1.0.0/actions/run.yaml index 8ae4601..a9eb2b7 100644 --- a/resources/mariadb_user/1.0.0/actions/run.yaml +++ b/resources/mariadb_user/1.0.0/actions/run.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - name: mariadb user mysql_user: diff --git a/resources/mariadb_user/1.0.0/actions/update.yaml b/resources/mariadb_user/1.0.0/actions/update.yaml index 3c0831f..65c785b 100644 --- a/resources/mariadb_user/1.0.0/actions/update.yaml +++ b/resources/mariadb_user/1.0.0/actions/update.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - name: mariadb user mysql_user: diff --git a/resources/openrc_file/1.0.0/actions/remove.yaml b/resources/openrc_file/1.0.0/actions/remove.yaml index de66259..011c5bf 100644 --- a/resources/openrc_file/1.0.0/actions/remove.yaml +++ b/resources/openrc_file/1.0.0/actions/remove.yaml @@ -1,5 +1,5 @@ - hosts: [ {{ host }} ] - sudo: yes + become: yes tasks: - file: path=/root/openrc state=absent diff --git a/resources/openrc_file/1.0.0/actions/run.yaml b/resources/openrc_file/1.0.0/actions/run.yaml index 3a1b495..316af56 100644 --- a/resources/openrc_file/1.0.0/actions/run.yaml +++ b/resources/openrc_file/1.0.0/actions/run.yaml @@ -1,5 +1,5 @@ - hosts: [{{ host }}] - sudo: yes + become: yes vars: tenant: {{tenant}} user_name: {{user_name}} diff --git a/resources/rabbitmq_config/1.0.0/actions/remove.yaml b/resources/rabbitmq_config/1.0.0/actions/remove.yaml index 48094d2..e734f31 100644 --- a/resources/rabbitmq_config/1.0.0/actions/remove.yaml +++ b/resources/rabbitmq_config/1.0.0/actions/remove.yaml @@ -1,4 +1,4 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - file: path={{config_dir}} state=absent diff --git a/resources/rabbitmq_config/1.0.0/actions/run.yaml b/resources/rabbitmq_config/1.0.0/actions/run.yaml index 6976a44..a0cdc38 100644 --- a/resources/rabbitmq_config/1.0.0/actions/run.yaml +++ b/resources/rabbitmq_config/1.0.0/actions/run.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes vars: admin_user: {{admin_user}} admin_password: {{admin_password}} diff --git a/resources/rabbitmq_user/1.0.0/actions/remove.yaml b/resources/rabbitmq_user/1.0.0/actions/remove.yaml index f1f5fc2..0d9045d 100644 --- a/resources/rabbitmq_user/1.0.0/actions/remove.yaml +++ b/resources/rabbitmq_user/1.0.0/actions/remove.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - rabbitmq_user: user={{user_name}} vhost={{vhost_name}} diff --git a/resources/rabbitmq_user/1.0.0/actions/run.yaml b/resources/rabbitmq_user/1.0.0/actions/run.yaml index 5b84d7e..e6f610b 100644 --- a/resources/rabbitmq_user/1.0.0/actions/run.yaml +++ b/resources/rabbitmq_user/1.0.0/actions/run.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - rabbitmq_user: user={{user_name}} password={{password}} diff --git a/resources/rabbitmq_vhost/1.0.0/actions/remove.yaml b/resources/rabbitmq_vhost/1.0.0/actions/remove.yaml index b9f5165..3603fbc 100644 --- a/resources/rabbitmq_vhost/1.0.0/actions/remove.yaml +++ b/resources/rabbitmq_vhost/1.0.0/actions/remove.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - rabbitmq_vhost: name={{vhost_name}} state=absent diff --git a/resources/rabbitmq_vhost/1.0.0/actions/run.yaml b/resources/rabbitmq_vhost/1.0.0/actions/run.yaml index f2a1be5..3b16d8d 100644 --- a/resources/rabbitmq_vhost/1.0.0/actions/run.yaml +++ b/resources/rabbitmq_vhost/1.0.0/actions/run.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - rabbitmq_vhost: name={{vhost_name}} state=present diff --git a/resources/riak_join_single/1.0.0/actions/join.yaml b/resources/riak_join_single/1.0.0/actions/join.yaml index c705d3f..20a2c6d 100644 --- a/resources/riak_join_single/1.0.0/actions/join.yaml +++ b/resources/riak_join_single/1.0.0/actions/join.yaml @@ -1,4 +1,4 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - shell: riak-admin cluster join {{join_to}} diff --git a/resources/riak_node/1.0.0/actions/commit.yaml b/resources/riak_node/1.0.0/actions/commit.yaml index 52bc471..e05904c 100644 --- a/resources/riak_node/1.0.0/actions/commit.yaml +++ b/resources/riak_node/1.0.0/actions/commit.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: # - shell: sleep 30 - shell: riak-admin cluster plan diff --git a/resources/riak_node/1.0.0/actions/join.yaml b/resources/riak_node/1.0.0/actions/join.yaml index 01d202f..7026b18 100644 --- a/resources/riak_node/1.0.0/actions/join.yaml +++ b/resources/riak_node/1.0.0/actions/join.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - shell: riak-admin cluster join {{join_to}} ignore_errors: true diff --git a/resources/riak_node/1.0.0/actions/remove.yaml b/resources/riak_node/1.0.0/actions/remove.yaml index 9af8478..226ea90 100644 --- a/resources/riak_node/1.0.0/actions/remove.yaml +++ b/resources/riak_node/1.0.0/actions/remove.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - apt: name: riak diff --git a/resources/riak_node/1.0.0/actions/run.yaml b/resources/riak_node/1.0.0/actions/run.yaml index cb553d4..6c15e54 100644 --- a/resources/riak_node/1.0.0/actions/run.yaml +++ b/resources/riak_node/1.0.0/actions/run.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: # those below are mostly for tests - shell: killall -u riak diff --git a/resources/riak_node/1.0.0/actions/update.yaml b/resources/riak_node/1.0.0/actions/update.yaml index a4a5af7..b1f6d44 100644 --- a/resources/riak_node/1.0.0/actions/update.yaml +++ b/resources/riak_node/1.0.0/actions/update.yaml @@ -1,5 +1,5 @@ - hosts: [{{host}}] - sudo: yes + become: yes tasks: - service: name: riak diff --git a/resources/solar_bootstrap/1.0.0/actions/run.yaml b/resources/solar_bootstrap/1.0.0/actions/run.yaml index 89bcfb3..3259ad7 100644 --- a/resources/solar_bootstrap/1.0.0/actions/run.yaml +++ b/resources/solar_bootstrap/1.0.0/actions/run.yaml @@ -2,7 +2,7 @@ # TODO: this shouldn't be outside of the resource directory - hosts: all - sudo: yes + become: yes tasks: - script: /vagrant/bootstrap/playbooks/files/ubuntu-ansible.sh #- include: celery.yaml tags=['master'] celery_dir=/var/run/celery diff --git a/resources/ssh_key/1.0.0/actions/run.yaml b/resources/ssh_key/1.0.0/actions/run.yaml index 1142397..022bea3 100644 --- a/resources/ssh_key/1.0.0/actions/run.yaml +++ b/resources/ssh_key/1.0.0/actions/run.yaml @@ -1,5 +1,5 @@ - hosts: '*' - sudo: yes + become: yes gather_facts: false # this is default variables, they will be overwritten by resource one vars: diff --git a/resources/transport_solar_agent/1.0.0/actions/run.yaml b/resources/transport_solar_agent/1.0.0/actions/run.yaml index ed118ec..0436850 100644 --- a/resources/transport_solar_agent/1.0.0/actions/run.yaml +++ b/resources/transport_solar_agent/1.0.0/actions/run.yaml @@ -1,5 +1,5 @@ - hosts: [{{ host }}] - sudo: yes + become: yes tasks: - shell: pip install git+git://github.com/Mirantis/solar-agent.git - shell: start-stop-daemon --stop --make-pidfile --pidfile /tmp/solar_agent.pid --startas /bin/bash -- -c "exec /usr/local/bin/solar_agent run --port {{solar_agent_port}} --base tcp > /tmp/solar_agent.log 2>&1" diff --git a/resources/transport_solar_agent/1.0.0/actions/update.yaml b/resources/transport_solar_agent/1.0.0/actions/update.yaml index ed118ec..0436850 100644 --- a/resources/transport_solar_agent/1.0.0/actions/update.yaml +++ b/resources/transport_solar_agent/1.0.0/actions/update.yaml @@ -1,5 +1,5 @@ - hosts: [{{ host }}] - sudo: yes + become: yes tasks: - shell: pip install git+git://github.com/Mirantis/solar-agent.git - shell: start-stop-daemon --stop --make-pidfile --pidfile /tmp/solar_agent.pid --startas /bin/bash -- -c "exec /usr/local/bin/solar_agent run --port {{solar_agent_port}} --base tcp > /tmp/solar_agent.log 2>&1" diff --git a/resources/transport_torrent/1.0.0/actions/run.yaml b/resources/transport_torrent/1.0.0/actions/run.yaml index 76b0083..95aef92 100644 --- a/resources/transport_torrent/1.0.0/actions/run.yaml +++ b/resources/transport_torrent/1.0.0/actions/run.yaml @@ -1,5 +1,5 @@ - hosts: [{{ host }}] - sudo: yes + become: yes tasks: - apt: name: python-libtorrent diff --git a/resources/volume_group/1.0.0/actions/remove.yaml b/resources/volume_group/1.0.0/actions/remove.yaml index d23e595..00158aa 100644 --- a/resources/volume_group/1.0.0/actions/remove.yaml +++ b/resources/volume_group/1.0.0/actions/remove.yaml @@ -1,5 +1,5 @@ - hosts: [{{ host }}] - sudo: yes + become: yes tasks: - name: remove VG lvg: vg={{name}} state=absent force=yes diff --git a/resources/volume_group/1.0.0/actions/run.yaml b/resources/volume_group/1.0.0/actions/run.yaml index 11ff2ad..e881cf0 100644 --- a/resources/volume_group/1.0.0/actions/run.yaml +++ b/resources/volume_group/1.0.0/actions/run.yaml @@ -1,5 +1,5 @@ - hosts: [{{ host }}] - sudo: yes + become: yes tasks: - name: install dependencies apt: name=lvm2 state=present diff --git a/resources/vxlan_mesh/1.0.0/actions/run.yaml b/resources/vxlan_mesh/1.0.0/actions/run.yaml index 48f5e8d..2151ca8 100644 --- a/resources/vxlan_mesh/1.0.0/actions/run.yaml +++ b/resources/vxlan_mesh/1.0.0/actions/run.yaml @@ -1,5 +1,5 @@ - hosts: '*' - sudo: yes + become: yes vars: id: 42 group: 239.1.10.2